🎨 Palette: [UX improvement] Improve accessibility and focus states in Navbar#115
🎨 Palette: [UX improvement] Improve accessibility and focus states in Navbar#115belpythons wants to merge 1 commit into
Conversation
Added `aria-expanded`, `aria-haspopup`, and `aria-label` to interactive icon-only elements (like the mobile menu and theme toggles) in the Navbar. Also added explicit focus rings (`focus-visible:ring-2 focus-visible:ring-accent-500`) to improve keyboard navigation visibility. 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:
Added proper ARIA attributes (
aria-expanded,aria-haspopup,aria-label) and explicit visible focus rings (focus-visible:ring-2) to interactive, icon-only buttons in theNavbar.jsxcomponent. This includes the Forum dropdown button, light/dark mode theme toggles, and the mobile hamburger menu button.🎯 Why:
Previously, these buttons lacked explicit focus states, making it very difficult for keyboard users to know which element was currently focused. Additionally, the lack of
aria-expandedandaria-labelattributes meant that screen reader users were not informed of the current state of dropdowns or the purpose of icon-only buttons (like the mobile menu).📸 Before/After:
(Visual changes add a noticeable orange focus ring around the mobile menu toggle when focused via keyboard navigation, as verified locally.)
♿ Accessibility:
aria-haspopup="true"andaria-expanded={isDropdownOpen}to the Forum dropdown.aria-label(toggling between "Open menu" and "Close menu") andaria-expanded={isOpen}to the mobile menu button.focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500to ensure a consistent, highly visible focus indicator for keyboard users across all icon-only interactive elements in the navbar.PR created automatically by Jules for task 13060513485504835409 started by @belpythons