WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Screen reader testing on language switching components.

for

From: Steve Green
Date: May 1, 2025 3:49AM


In my view, each link in the language switcher should be written in the language that the link points to, and it should have the corresponding "lang" attribute. It doesn't matter that a person who speaks the language that is currently selected cannot understand some of the links. The important thing is that someone who needs to switch to another language can find the appropriate link.

Steve

From: Mark Magennis < <EMAIL REMOVED> >
Sent: 01 May 2025 10:38
To: Steve Green < <EMAIL REMOVED> >; WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] [EXTERNAL] Screen reader testing on language switching components.

It sounds like you're right Steve. It would fail 2.5.3. As for how it would pronounce the label, that may also be an issue and whilst my memory of testing this with screen readers is weak I concluded at the time that this was the best of a bad bunch of options and I will always opt for practical usability rather than WCAG compliance. Having said that, I think I only tested in English, German and French because the product didn't support other languages so it may be less robust with other languages.

Mark

From: Steve Green
Sent: Monday, April 28, 2025 17:37
To: WebAIM Discussion List
Cc: Mark Magennis
Subject: RE: [WebAIM] [EXTERNAL] Screen reader testing on language switching components.

Why would you add the "aria-label" attributes at step 3? If I understand what you are saying, if the current page is in English, the link to the German version would have the visible text "Deutsch" but it would have the attributes aria-label="German" and lang="de". If that's what you mean, it would fail SC 2.5.3 (Label In Name) and a screen reader would say "German" in a German accent.

Steve