- Success Criterion 3.1.1
- Conformance level A
Language Attribute Set to an Invalid or Malformed Value
3.1.1 — Language of Page
Scenario
Setting
A survey tool's question builder
What’s wrong
Invalid values: lang="english", lang="EN-UK", region codes malformed beyond recognition.
Example
<html lang="english">
<body>
<label for="q1">Question 1</label>
<input type="text" id="q1">
</body>
</html> Why it matters
An invalid language code like 'english' isn't a recognized BCP 47 tag, so assistive tech can't match it to any known speech engine and silently falls back to a default.
How to test
Check the html lang value against the ISO language code list: values like "english" or malformed region codes ("EN-UK") are invalid and fail.
How to fix
Use valid BCP 47 subtags only, like "en" or "en-GB", never a full language name or a malformed region code.
<html lang="en">
<body>
<label for="q1">Question 1</label>
<input type="text" id="q1">
</body>
</html> Outcome
A survey author's preview reads back in a properly matched voice, confirming the question text is correct.
Who is affected
Screen reader users building or previewing surveys get inconsistent pronunciation because the declared value doesn't map to a real language.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Page Published With No Language Declared in the Code
- HTML Element Missing Its Language Attribute Entirely
- Page’s Declared Language Not Matching Its Actual Content
- 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