Skip to content

🎨 Palette: Improve LanguageSwitcher accessibility#15

Open
Twinber wants to merge 1 commit intomasterfrom
palette/fix-language-switcher-a11y-8923621371731619968
Open

🎨 Palette: Improve LanguageSwitcher accessibility#15
Twinber wants to merge 1 commit intomasterfrom
palette/fix-language-switcher-a11y-8923621371731619968

Conversation

@Twinber
Copy link
Owner

@Twinber Twinber commented Mar 16, 2026

💡 What: Refactored the LanguageSwitcher to use semantic HTML <button> tags instead of <span> elements with onClick handlers. Added aria-labels and focus-visible styling.

🎯 Why: The previous implementation was inaccessible. Users navigating via keyboard could not focus on or select a language. Screen readers did not identify the options as interactive buttons or describe their function clearly.

📸 Before/After: The buttons now have focus rings and are fully accessible via keyboard (Tab and Enter/Space).

Accessibility:

  • Changed <span> to <button>
  • Added aria-label to clarify intent (e.g. "Switch to English")
  • Added aria-hidden="true" to the decorative slash (/) separator
  • Added focus-visible:outline utility classes for clear visual keyboard focus indicators

PR created automatically by Jules for task 8923621371731619968 started by @Twinber

- Replaced `<span>` elements with semantic `<button>` tags
- Added `aria-label` attributes for screen readers
- Added `aria-hidden="true"` to the separator slash
- Added `focus-visible:outline` styles for keyboard navigation
- Fixed minor lint and build errors in `GmapsButton.tsx` and `NetworkItem.tsx`

Co-authored-by: Twinber <5513621+Twinber@users.noreply.github.com>
@google-labs-jules
Copy link

👋 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