🎨 Palette: Add accessibility attributes and focus rings to Navbar#102
🎨 Palette: Add accessibility attributes and focus rings to Navbar#102belpythons wants to merge 1 commit into
Conversation
- Added `aria-expanded` and `aria-haspopup` to the Forum dropdown button. - Added `aria-expanded` and `aria-controls` to the mobile menu toggle button. - Added explicitly associated `id="mobile-menu"` to the mobile menu container. - Added explicit keyboard focus rings (`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500`) to interactive, icon-only buttons (theme toggles, mobile menu). - Documented findings in `.jules/palette.md`. Co-authored-by: belpythons <187399139+belpythons@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. |
💡 What
This PR enhances the accessibility of the
Navbarcomponent. It introduces critical ARIA attributes to the interactive disclosure widgets (the Forum dropdown and the mobile navigation menu) and adds clear, explicit keyboard focus rings to the icon-only buttons (the theme toggles and the mobile menu toggle).🎯 Why
aria-expandedandaria-controlsto understand and announce the state (open/closed) of dynamic menus. Without them, users navigating via assistive technologies lack context about what their actions are doing.📸 Before/After
A visual verification script was run to confirm that navigating via the
Tabkey now correctly triggers anaccent-500outline on the previously un-styled icon buttons.♿ Accessibility
aria-expanded={isDropdownOpen}andaria-haspopup="true"to the Forum dropdown.aria-expanded={isOpen},aria-controls="mobile-menu", and explicitly setid="mobile-menu"on the mobile navigation container.focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500to the desktop theme toggle, mobile theme toggle, and mobile menu toggle.PR created automatically by Jules for task 16988768704894414862 started by @belpythons