Skip to content

🎨 Palette: Improve accessibility of ClassificationPreview action buttons#189

Open
thebearwithabite wants to merge 1 commit intomasterfrom
palette-a11y-classification-preview-7480254534820878181
Open

🎨 Palette: Improve accessibility of ClassificationPreview action buttons#189
thebearwithabite wants to merge 1 commit intomasterfrom
palette-a11y-classification-preview-7480254534820878181

Conversation

@thebearwithabite
Copy link
Copy Markdown
Owner

🎨 Palette UX/A11y Enhancement

This PR focuses on a micro-UX improvement for the ClassificationPreview component, specifically targeting screen reader and keyboard navigation accessibility.

💡 What:

  • Added an aria-label="Skip organization" to the icon-only close (X) button.
  • Added aria-hidden="true" to the decorative Lucide React icons within the action buttons (Loader2, Check, RefreshCw, X).
  • Applied consistent focus-visible:ring-2 (and related outline/offset utilities) to all action buttons.
  • Updated .jules/palette.md to document the learning.

🎯 Why:

  • Screen Readers: Previously, the "Skip" button was just an X icon, meaning a screen reader would announce it unhelpfully as "button". Adding the aria-label provides necessary context. Adding aria-hidden to the SVG icons prevents the screen reader from trying to read out the SVG paths or duplicate the button's text label.
  • Keyboard Navigation: While mouse users easily understand button bounds, keyboard users rely on focus states. The standard Tailwind classes didn't provide a strong enough visual indicator when tabbing through the ClassificationPreview modal. The focus-visible classes ensure a clear ring appears.

📸 Before/After:

  • Visual changes are isolated to focus states. When tabbing to the Confirm, Reclassify, or Skip buttons, a clear white focus ring now appears.

♿ Accessibility:

  • Improved semantics for screen reader users.
  • Improved visual focus indicators for keyboard users.

PR created automatically by Jules for task 7480254534820878181 started by @thebearwithabite

…icationPreview

- 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>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant