- Success Criterion 3.1.2
- Conformance level AA
Language Switcher Link With No Language Tag of Its Own
3.1.2 — Language of Parts
Scenario
Setting
An e-book reader's library page
What’s wrong
Language-switcher links written in their own language ("Deutsch", "日本語") without their own lang attributes.
Example
<nav class="language-switcher">
<a href="/de">Deutsch</a>
<a href="/ja">日本語</a>
<a href="/en">English</a>
</nav> Why it matters
A screen reader announces 'Deutsch' and the Japanese link text using the page's base English voice, mangling the very labels a reader needs to identify their language.
How to test
Inspect language-switcher links (e.g., 'Deutsch', '日本語'): check whether each carries its own lang attribute matching the language it's written in.
How to fix
Tag each language-switcher link with the language it names, not the page's current language.
<nav class="language-switcher">
<a href="/de" lang="de">Deutsch</a>
<a href="/ja" lang="ja">日本語</a>
<a href="/en" lang="en">English</a>
</nav> Outcome
A reader browsing the library hears each language option announced clearly in its own voice and picks the right one.
Who is affected
Screen reader users choosing their preferred reading language need each link's name pronounced correctly to recognize it at all.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- No Way to Programmatically Tell Which Language a Passage Uses
- Foreign-Language Quote or Phrase With No Language Attribute
- Mixed-Language Legal or Product Text Left Entirely Unmarked
- Language Attribute Copy-Pasted Onto the Wrong Piece of Text
- Bilingual Layout Where One Column’s Language Goes Unmarked
- User-Generated Content in Another Language Never Tagged