🎨 Palette: Accessible ToggleRow Switch#230
Conversation
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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
💡 What: Added proper ARIA attributes (
role="switch",aria-checked,aria-label) and visual keyboard focus indicators (focus-visible) to the custom toggle button within theToggleRowcomponent inUserPreferencesModal.tsx. Also addedtype="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:
aria-checked.aria-label.focus-visibleclasses.type="button"prevents unintended form submission contexts.PR created automatically by Jules for task 5180669203204594680 started by @aarjava