Skip to content

🎨 Palette: Semantic HTML and Language Switcher Accessibility Improvements#17

Open
Twinber wants to merge 1 commit intomasterfrom
palette-accessibility-improvements-13566532703678938573
Open

🎨 Palette: Semantic HTML and Language Switcher Accessibility Improvements#17
Twinber wants to merge 1 commit intomasterfrom
palette-accessibility-improvements-13566532703678938573

Conversation

@Twinber
Copy link
Owner

@Twinber Twinber commented Mar 18, 2026

💡 What:

  • Converted non-interactive <span> elements into fully accessible <button> tags within the Language Switcher. Added aria-label and focus-visible states.
  • Utilized Radix UI's <Button asChild> functionality to properly wrap semantic <Link> and native <a> tags in NetworkItem and GmapsButton respectively, preventing nested invalid HTML while preserving visual Shadcn styling.
  • Resolved a critical pnpm build failure related to template string paths in <Link>.
  • Added rel="noopener noreferrer" to external window opening links for safety.
  • Resolved a Number object typing eslint error.

🎯 Why:
Interactive elements like Language Switchers must be semantic tab targets for screen readers to work correctly, and keyboard users need visual focus indicators. Additionally, standard React/Tanstack links should not be wrapped as raw children inside visual <button> styling tags as it creates invalid, non-semantic HTML trees that break browser accessibility mapping.

Accessibility:

  • Added robust keyboard focus states using Tailwind's focus-visible:outline utilities.
  • Added descriptive aria-labels specifying intent ("Switch language to English").
  • Removed invalid nested generic HTML wrappers from interactive routing components.

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

- Wrap `Link` and `a` elements with `Button asChild` in `NetworkItem` and `GmapsButton` for semantic HTML.
- Change `LanguageSwitcher` to use semantic `<button>` elements with `aria-label`s and `focus-visible` styles instead of `<span>` elements.
- Add `rel="noopener noreferrer"` to external Google Maps link.
- Fix TanStack Router `to` prop usage in `NetworkItem`.
- Fix `Number` to `number` type in `GmapsButton` to fix linting error.

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