🎨 Palette: Enhance keyboard accessibility for Kids UI header elements#158
🎨 Palette: Enhance keyboard accessibility for Kids UI header elements#158billlzzz10 wants to merge 3 commits into
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@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.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
💡 What:
Added explicit keyboard focus rings (
focus-visible:ring-[#FFD700]) to all interactive elements within the Kids UI header (KidsHeader,MusicButton, andSettingsButton). In addition, proper ARIA attributes (aria-expanded,aria-controls,aria-haspopup, andaria-pressed) were added to mobile menu dropdowns, the settings modal trigger, and the music toggle to better communicate state to assistive technology.🎯 Why:
The
pixel-btnstyle intentionally removes the native browser focus outline to preserve the pixel-art aesthetic, but this resulted in a complete lack of visual feedback for keyboard users navigating the header. Furthermore, the missing stateful ARIA attributes meant screen readers couldn't identify if menus were open or if the music was toggled on/off.📸 Before/After:
Before: Tabbing through the header provided no visible indicator of the active element, and screen readers read toggles as generic buttons without state.
After: A high-contrast yellow focus ring (
#FFD700) correctly matches the Kids UI theme and provides clear visual feedback on focus, while screen readers now announce the toggled/expanded states.♿ Accessibility:
focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-offset-2).aria-pressedfor theMusicButton.aria-expandedandaria-controlsfor the mobile dropdown menu.aria-expandedandaria-haspopupfor theSettingsButton.aria-hidden="true".PR created automatically by Jules for task 9432200916299054313 started by @billlzzz10
Summary by cubic
Improved keyboard accessibility in the Kids UI header by adding visible focus rings and stateful ARIA attributes across the header and mobile menu. Keyboard users get a clear yellow focus ring, and screen readers announce menu, dialog, and toggle states.
KidsHeader,MusicButton,SettingsButton, menu items).aria-pressedon music toggle;aria-expanded+aria-controls="mobile-menu"on the menu button with matchingid;aria-expanded+aria-haspopup="dialog"on the settings button.aria-hidden="true".Written for commit 7bc92c2. Summary will update on new commits.