Skip to content

🎨 Palette: Add accessibility attributes and focus rings to Navbar#102

Open
belpythons wants to merge 1 commit into
masterfrom
palette/navbar-accessibility-16988768704894414862
Open

🎨 Palette: Add accessibility attributes and focus rings to Navbar#102
belpythons wants to merge 1 commit into
masterfrom
palette/navbar-accessibility-16988768704894414862

Conversation

@belpythons

Copy link
Copy Markdown
Owner

💡 What

This PR enhances the accessibility of the Navbar component. 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

  • Screen readers rely on attributes like aria-expanded and aria-controls to 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.
  • Keyboard-only users need strong visual indicators to know which element currently has focus. Icon-only buttons often fail to provide adequate default focus states.

📸 Before/After

A visual verification script was run to confirm that navigating via the Tab key now correctly triggers an accent-500 outline on the previously un-styled icon buttons.

♿ Accessibility

  • Added aria-expanded={isDropdownOpen} and aria-haspopup="true" to the Forum dropdown.
  • Added aria-expanded={isOpen}, aria-controls="mobile-menu", and explicitly set id="mobile-menu" on the mobile navigation container.
  • Added focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500 to the desktop theme toggle, mobile theme toggle, and mobile menu toggle.

PR created automatically by Jules for task 16988768704894414862 started by @belpythons

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

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