3.1.1 Language of Page
- Level A
- In WCAG 2.0, 2.1, 2.2
- 3. Understandable › 3.1 Readable
What WCAG says
The default human language of each web page can be programmatically determined.
Quoted from W3C. More in W3C’s Understanding 3.1.1.
How to check it yourself
- The scan checks that a language is set. Check it’s the right one: an English page must not say lang="fr".
Can an automated test check it?
Partly. Our scanner runs these 3 axe-core rules for 3.1.1 whenever your chosen WCAG version and level include it. They can prove some failures, but a pass doesn’t prove the page meets the criterion: a person still needs to do the checks above.
- <html> element must have a lang attribute
html-has-lang - <html> element must have a valid value for the lang attribute
html-lang-valid - HTML elements with lang and xml:lang must have the same base language
html-xml-lang-mismatch
Scan a web page to see which criteria it fails, or read how the checker works.