From e0f72d3faa9fc79865d0c2c373b77fecb633315a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:31:17 +0000 Subject: [PATCH] feat(ux): improve screen reader and keyboard accessibility in ClassificationPreview - Added `aria-label` and `title` to the icon-only 'Skip' button. - Added `aria-hidden="true"` to Lucide icons (`Loader2`, `Check`, `RefreshCw`, `X`) within buttons to prevent redundant screen reader announcements. - Added `focus-visible` Tailwind classes to action buttons to ensure clear visible focus rings during keyboard navigation. - Recorded a new learning entry in `.jules/palette.md` regarding icon-only button accessibility. Co-authored-by: thebearwithabite <216692431+thebearwithabite@users.noreply.github.com> --- .jules/palette.md | 4 ++++ .../organize/ClassificationPreview.tsx | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.jules/palette.md b/.jules/palette.md index 9446e81..37cde4d 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -1,3 +1,7 @@ ## 2024-03-16 - Make hover-only actions keyboard accessible **Learning:** Actions hidden behind `opacity-0` and revealed with `group-hover:opacity-100` are completely inaccessible to keyboard-only users navigating via Tab. This is a common pattern for "secondary" actions like undo/delete buttons in lists. **Action:** When using `opacity-0 group-hover:opacity-100` to hide secondary actions, always pair it with `focus-visible:opacity-100`, `focus-visible:ring-2`, and `focus-visible:outline-none` to ensure the action becomes visible and clearly highlighted when focused via keyboard navigation. + +## 2024-03-30 - Screen Reader Accessibility for Icon-Only Action Buttons +**Learning:** Action buttons composed exclusively of decorative or functional icons (e.g., Lucide React icons like X, Loader2, Check) inside of status/preview dialogs often lack sufficient text context, causing screen readers to announce them cryptically as just "button". +**Action:** Always apply an `aria-label` or `title` containing a clear description (e.g., "Skip organization") to the parent `