Skip to content

Language switch: label and accessible name don't match #5108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
gfellerph opened this issue Mar 27, 2025 · 0 comments · May be fixed by #5350
Open
2 of 3 tasks

Language switch: label and accessible name don't match #5108

gfellerph opened this issue Mar 27, 2025 · 0 comments · May be fixed by #5350
Assignees
Labels
🐞 bug Something isn't working 📦 components Related to the @swisspost/design-system-components package research This issue requires research before it can be implemented.

Comments

@gfellerph
Copy link
Member

gfellerph commented Mar 27, 2025

The language switch contains an aria-label that does not match or include the visible text of the control. This is an issue for speech navigation where users dictate the text of the element they see and the assistant tries to find this element by it's accessible name (the aria-label if set). If these don't match, speech input fails to locate the control.

More info: https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.

Tasks

  • Update recommendations on labelling the language switch so it's conform with SC 2.5.3

Updated Tasks

  • Replace aria-label with visually-hidden text.
  • Add information to the language switch documentation on proper usage of the language options name prop.
@gfellerph gfellerph added the 📦 components Related to the @swisspost/design-system-components package label Mar 27, 2025
@gfellerph gfellerph added this to the Long Term Support v9 milestone Mar 27, 2025
@gfellerph gfellerph added the 🐞 bug Something isn't working label Mar 27, 2025
@gfellerph gfellerph moved this from 👀 Triage to 🆗 Ready in Design System Production Board Apr 2, 2025
@gfellerph gfellerph added the research This issue requires research before it can be implemented. label Apr 2, 2025
@myrta2302 myrta2302 self-assigned this Apr 25, 2025
@myrta2302 myrta2302 moved this from 🆗 Ready to 💻 In Progress in Design System Production Board Apr 25, 2025
@myrta2302 myrta2302 moved this from 💻 In Progress to 🧐 In Review in Design System Production Board Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 📦 components Related to the @swisspost/design-system-components package research This issue requires research before it can be implemented.
Projects
Status: 🧐 In Review
Development

Successfully merging a pull request may close this issue.

3 participants