🎨 Palette: Improve LanguageSwitcher accessibility#15
Conversation
- 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>
|
👋 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: Refactored the
LanguageSwitcherto use semantic HTML<button>tags instead of<span>elements withonClickhandlers. Addedaria-labels andfocus-visiblestyling.🎯 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 (
TabandEnter/Space).♿ Accessibility:
<span>to<button>aria-labelto clarify intent (e.g. "Switch to English")aria-hidden="true"to the decorative slash (/) separatorfocus-visible:outlineutility classes for clear visual keyboard focus indicatorsPR created automatically by Jules for task 8923621371731619968 started by @Twinber