WCAG 3.1.1: Language of Page
The default human language of each web page must be programmatically identified using the lang attribute on the HTML element. This enables screen readers to use the correct pronunciation rules and helps translation tools.
What is WCAG 3.1.1 Language of Page?
WCAG 3.1.1 Language of Page is a Level A web accessibility success criterion under the Understandable principle. The default human language of each web page must be programmatically identified using the lang attribute on the HTML element. This enables screen readers to use the correct pronunciation rules and helps translation tools. Common failures include missing lang attribute on the <html> element entirely and using an incorrect or invalid language code. Meeting this criterion is essential for accessible, inclusive web design.
How to Test
- ✓ Check that the <html> element has a valid lang attribute
- ✓ Verify the lang value matches the page's primary language (e.g., 'en', 'es', 'fr')
- ✓ Use a validator to check the lang attribute value is a valid BCP 47 language tag
- ✓ Test with a screen reader to verify correct pronunciation
Common Failures
- ✗ Missing lang attribute on the <html> element entirely
- ✗ Using an incorrect or invalid language code
- ✗ Using the wrong language code (e.g., lang='en' on a French page)
- ✗ Using a region code without a language code (e.g., 'US' instead of 'en-US')
✓ Good Example
<!-- English page --> <html lang="en"> <!-- Spanish page --> <html lang="es"> <!-- French Canadian page --> <html lang="fr-CA">
Each HTML element has a valid lang attribute matching the page's primary language. Regional variants (fr-CA) are also valid.
✗ Bad Example
<!-- Missing lang attribute --> <html> <!-- Invalid language code --> <html lang="english">
The first example has no lang attribute, so screen readers must guess the language. The second uses 'english' instead of the valid BCP 47 code 'en'.
Test Your Site for 3.1.1 Compliance
Use our free accessibility tools to check your website against WCAG 3.1.1.
Open Testing Tool