3.1.1 Language of Page
Level A Since WCAG 2.0 How it is checked: Automated checker
In plain language
Declare the main language of the page so screen readers read it with the right voice and pronunciation.
Who is affected
- Blind people using screen readers
Examples
Fails
<html> or <html lang="vi"> on an English pagePasses
<html lang="en">How to fix
- Add lang="en" to the html tag; a page in another language uses its own code (e.g. lang="vi" for Vietnamese).
How to test it yourself
- Check the html tag in the page source; listen with a screen reader to hear whether it uses the right voice.
What WCAG.win checks
WCAG.win checks part of this criterion automatically. The rest still needs a person.
- Automated checker – rule
html-has-lang: <html> element must have a lang attribute - Automated checker – rule
html-lang-valid: <html> element must have a valid value for the lang attribute - Automated checker – rule
html-xml-lang-mismatch: HTML elements with lang and xml:lang must have the same base language
W3C documentation: Understanding Success Criterion 3.1.1: Language of Page