From fe75526ec0fbcd7aacaf74fe833f4e1df352b01e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 08:24:47 +0000 Subject: [PATCH] feat: add a11y to cloud library modal Co-authored-by: ford442 <9397845+ford442@users.noreply.github.com> --- .Jules/palette.md | 3 +++ src/components/CloudLibrary.tsx | 15 ++++++++++++++- vite.config.ts | 15 +++++++++------ 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.Jules/palette.md b/.Jules/palette.md index 65496c31..0a19f42a 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -23,3 +23,6 @@ ## 2024-05-18 - Missing Focus Visible States on Custom Switches **Learning:** Custom UI controls that mimic native inputs (like pill-shaped switches for Reverse or Melodic Mode) frequently omit `focus-visible` styles, rendering them completely invisible to keyboard users when tabbing through the interface. Furthermore, developers frequently mistakenly use `aria-pressed` with `role="button"` instead of the correct `role="switch"` with `aria-checked` for these pill-shaped components. **Action:** Always verify that interactive custom switches not only have appropriate ARIA roles (`role="switch"`, `aria-checked`) but explicitly define `focus:outline-none focus-visible:ring-*` classes. +## 2026-04-09 - Standardize Modal Accessibility for Cloud Library +**Learning:** The `CloudLibrary` component functioned as a modal visually but lacked standard ARIA modal attributes (`role="dialog"`, `aria-modal="true"`, `aria-labelledby`), causing screen readers to announce it incorrectly or not at all. +**Action:** When implementing custom modals, always include `role="dialog"`, `aria-modal="true"`, an explicit `aria-labelledby` referencing a visually hidden or visible title element, and an `aria-hidden="true"` on the clickable background overlay. diff --git a/src/components/CloudLibrary.tsx b/src/components/CloudLibrary.tsx index 19c5c4c0..fa240796 100644 --- a/src/components/CloudLibrary.tsx +++ b/src/components/CloudLibrary.tsx @@ -188,9 +188,22 @@ export const CloudLibrary: React.FC = ({ return (
-
+