Skip to content

🎨 Palette: Accessible ToggleRow Switch#230

Open
aarjava wants to merge 2 commits into
mainfrom
palette/a11y-toggle-row-5180669203204594680
Open

🎨 Palette: Accessible ToggleRow Switch#230
aarjava wants to merge 2 commits into
mainfrom
palette/a11y-toggle-row-5180669203204594680

Conversation

@aarjava

@aarjava aarjava commented Jul 12, 2026

Copy link
Copy Markdown
Owner

💡 What: Added proper ARIA attributes (role="switch", aria-checked, aria-label) and visual keyboard focus indicators (focus-visible) to the custom toggle button within the ToggleRow component in UserPreferencesModal.tsx. Also added type="button" to explicitly declare its behavior.

🎯 Why: Custom interactive elements built with divs or bare <button>s lack semantic meaning for screen readers. Users navigating via assistive technologies had no way of knowing this button was a toggle switch or its current state. Additionally, missing focus outlines made it difficult for keyboard users to track their current position on the page.

📸 Before/After: Visually identical for mouse users, but keyboard navigation now displays a clear, brand-colored focus ring (ring-[#6C63FF]) when tabbing to the toggle.

Accessibility:

  • Screen readers now correctly announce the element as a switch and communicate its on/off state via aria-checked.
  • Screen readers read the purpose of the switch via aria-label.
  • Keyboard users now receive clear visual feedback when focusing the toggle via focus-visible classes.
  • Explicit type="button" prevents unintended form submission contexts.

PR created automatically by Jules for task 5180669203204594680 started by @aarjava

Added role="switch", aria-checked, aria-label, type="button", and focus-visible styling to the custom toggle button in UserPreferencesModal to enhance screen reader compatibility and keyboard navigation.

Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 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.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fluxlens-ai Ready Ready Preview, Comment Jul 12, 2026 10:39pm

Added role="switch", aria-checked, aria-label, type="button", and focus-visible styling to the custom toggle button in UserPreferencesModal to enhance screen reader compatibility and keyboard navigation.

Co-authored-by: aarjava <218419324+aarjava@users.noreply.github.com>
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