Understandable
3.1.1 Language of Page
Each page must declare its main language in the code, so screen readers use the right pronunciation.
Who it helps
Screen reader users and people using translation tools.
Failures we see most
- No lang attribute on the html element
- A lang value that no longer matches after the site was translated
How it gets tested
Our scanner runs these 3 axe-core checks for 3.1.1:
| Check | What it looks for |
|---|---|
html-has-lang | <html> element must have a lang attribute |
html-lang-valid | <html> element must have a valid value for the lang attribute |
html-xml-lang-mismatch | HTML elements with lang and xml:lang must have the same base language |
Automated checks can find failures of 3.1.1, but they cannot confirm that a page passes. A specialist still reviews it by hand.
How we fix it
Our tools set the page language on your base template.
Official text: W3C, Understanding 3.1.1 Language of Page. Checks listed from axe-core 4.14.0.
Related criteria
Does your site fail 3.1.1?
Our free scan checks up to 50 of your pages and tells you which criteria fail and where.