Powered by
Language & reading
The Page Doesn't Say What Language It's In
Without a language set on the page, screen readers may read the words with the wrong accent and rules, making them hard or impossible to understand.
html-has-langWCAG 2.0Introduced in WCAG 2.0.Level AA — the minimum. Missing it blocks people outright.
- Status
- SeriousSerious — Significant friction, or information that is lost.CurrentScanners run this rule today.
- Owner
- DevContentTest
- Audit
- AutomatedA scanner finds it, and a clean scan means it's fixed.
Why it matters
Screen readers use the page's language to pick a voice and pronunciation. Browsers use it for translation, spell-checking and hyphens.
If the language is missing, the screen reader guesses. It often uses the person's default language, so the words come out garbled.
Who it affects
| Who | What they experience | Impact |
|---|---|---|
| Screen reader users | They may hear English words read with another language's sounds, or the reverse, and can't follow along. | High impact |
| Low-vision users (magnification) | Affected if they use text-to-speech or a screen reader, as many do. | Partial impact |
| Cognitive and neurodivergent users | Tools that read text aloud or simplify it may mispronounce words or fail to work. | Partial impact |
| Deaf and hard of hearing | Browser translation and captions tools may guess the language wrongly. | Partial impact |
Business & product impact
| Area | Why | Impact |
|---|---|---|
| Legal | It fails WCAG 3.1.1 at Level A, the minimum. Complaints under Australia's Disability Discrimination Act and EN 301 549 point to WCAG. | High impact |
| Conversion | If people can't understand the page, they can't buy or sign up. Few sites lose much here, but those who do lose it all. | Moderate impact |
| SEO | Search engines mostly work out language from the text itself. Any search benefit is small. | Low impact |
| Brand trust | A site read in a garbled voice feels broken to the people using it. | Moderate impact |
| Cost to fix | A one-word fix in the main page template. | High impact |
Fixing it in code
Set the page language
Don't
<html>A screen reader says: “The screen reader guesses the language, often reading words with the wrong accent.”
Do
<html lang="en-AU">A screen reader says: “The screen reader reads the page in an English voice.”
The lang attribute tells every tool which language to use.
A page in another language
Don't
<html lang="en">
<h1>Bienvenue</h1>A screen reader says: “"Bienvenue" read with English sounds.”
Do
<html lang="fr">
<h1>Bienvenue</h1>A screen reader says: “"Bienvenue" read with French sounds.”
The code must match the language the page is actually written in.
Designer's handoff note
For each translated page, note its language so the build sets the right lang code.
Content teams: tell developers when a page or template is in a different language.
Quick test
Tool
The browser's developer tools (opens in a new tab) (free in every browser)
Checklist
- Pass
- The `<html>` tag has a `lang` code that matches the page's language.
- Fail
- There's no `lang`, it's empty, or it names the wrong language.
What a green scan still misses
A scanner checks that lang exists. It can't tell whether it names the right language — a French page marked en still passes.
Reference
- Rule ID
html-has-lang- Raised by
- axe-core: “<html> element must have a lang attribute”
- Lighthouse: “<html> element has a [lang] attribute”
- WCAG
- 3.1.1 Language of Page (opens in a new tab) · Level A · since WCAG 2.0
- Other standards
- EN 301 549 9.3.1.1 · RGAA 8.3.1
- Last reviewed
- 14 October 2026