SeriousWCAG 3.1.1 · Level A
html-has-langPage has no language set
Without a lang attribute on <html>, screen readers guess the language and may read English text with a German or French voice. Add lang="en" (or your page’s language) to the <html> element.
Who it hurts
Screen reader users, and people using translation or reading tools.
Mispronounced text is hard to follow. It also helps browsers offer the right translation and hyphenation.
How to fix it
Pick your stack. Review every change before you ship it.
Before
<html>After
<html lang="en">Check it by hand too
Check that each language version of the site sets its own lang value, and that passages in another language use lang on their element.
Automated checks find a large share of accessibility problems, but not all of them. Passing this check does not on its own make a page compliant.
WCAG reference
- 3.1.1 Language of Page (Level A). Understanding 3.1.1