- Success Criterion 3.1.1
- Conformance level A
Page Published With No Language Declared in the Code
3.1.1 — Language of Page
Scenario
Setting
A music streaming app's playlist screen
What’s wrong
The playlist screen's HTML omits a lang attribute entirely, so assistive technology has no way to know the page's content is in English and can't pick the correct pronunciation rules.
Example
<html>
<head><title>My Playlists</title></head>
<body>
<h1>Liked Songs</h1>
<ul><li>Song One - Artist A</li></ul>
</body>
</html> Why it matters
Without a declared language, a screen reader falls back to its default voice, mispronouncing artist names and song titles a listener relies on to pick the right track.
How to test
Check View Source or DevTools for the html tag's lang attribute: if there's no way to determine the page's set language programmatically, it fails.
How to fix
Declare lang on every HTML document, not just localized ones; it's a single attribute with a platform-wide payoff.
<html lang="en">
<head><title>My Playlists</title></head>
<body>
<h1>Liked Songs</h1>
...
</body>
</html> Outcome
A listener picks the right playlist confidently, guided by voice output that sounds like natural English.
Who is affected
Screen reader and braille display users navigating playlists by ear need correct pronunciation to tell similarly named tracks apart.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- HTML Element Missing Its Language Attribute Entirely
- Page’s Declared Language Not Matching Its Actual Content
- Language Attribute Set to an Invalid or Malformed Value
- Language Switcher That Doesn’t Update the Page’s Lang Attribute
- Language Attribute Set on the Body Instead of the HTML Root
- Multilingual Site Serving Every Locale With the Same Lang Value