- 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
No numbered W3C failure technique exists for this rule — it fails simply when the required feature/behavior is missing or inadequate (see the scenarios below).
Example
Open a music streaming app's playlist screen and this is what you'll see: no numbered W3C failure technique exists for this rule — it fails simply when the required feature/behavior is missing or inadequate (see the scenarios below).
Why it matters
Screen-reader users who need correct pronunciation, and tools that depend on language metadata. The practical effect on a music streaming app's playlist screen: they hear the wrong pronunciation throughout.
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
The <html> element must carry a valid lang attribute matching the page language, updated when the site language switches.
Outcome
That one change on a music streaming app's playlist screen means they hear the correct pronunciation.
Who is affected
Screen-reader users who need correct pronunciation, and tools that depend on language metadata.
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