The page must declare its language
Rule
html-lang· Document, language & navigation · impact serious · Static + live
Why it matters
Without , screen readers guess the language and may read the page with the wrong pronunciation rules, making it hard to understand.
How to fix
Add lang to , e.g. .
Example
<html><body>Hi</body></html>
<html lang="en"><body>Hi</body></html>
Example
<html xml:lang="en"><body>Hi</body></html>
<html lang="en" xml:lang="en"><body>Hi</body></html>
WCAG success criteria
3.1.1 Language of Page — Level A
The default human language of the page must be set programmatically ().
Standards
This rule contributes to the following standards:
WCAG A EN 301 549 Trusted Tester ACT
| Standard | Criteria |
|---|---|
| EN 301 549 | 9.3.1.1 |
| Trusted Tester v5 | 11.a |
| ACT (WCAG SC) | 3.1.1 |