Skip to content

A11Y Cheat Sheet

Powered byA11y University

Language & reading

The Page's Language Code Is Not a Real Language

The page says it's written in a language that doesn't exist, so screen readers guess the voice and accent — and often read the words wrongly.

html-lang-validWCAG 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

The lang attribute on <html> tells screen readers which language voice to use. A typo like lang="en-AU" written as lang="au" or lang="english" is not a real code.

When the code is invalid, the screen reader falls back to its default voice. English text may be read with French sounds, or the reverse. Translation tools and spell checkers can also get it wrong.

Who it affects

Who it affects, and how much
WhoWhat they experienceImpact
Screen reader usersThey may hear the page in the wrong accent or pronunciation, which can be hard to understand.High impact
Low-vision users (magnification)Affected if they use a screen reader or read-aloud tool, as many do.Partial impact
Cognitive and neurodivergent usersText-to-speech and reading tools may mispronounce words, making the page harder to follow.Partial impact
Deaf and hard of hearingBrowser translation and captions tools may misjudge the language.Partial impact

Business & product impact

Business & product impact, with how much each claim weighs
AreaWhyImpact
LegalIt fails WCAG 3.1.1 at Level A, the minimum, and EN 301 549. Complaints under Australia's Disability Discrimination Act point to WCAG.High impact
SEOSearch engines mostly use other signals for language. Little real benefit — don't sell it as one.Low impact
Brand trustA site read in a garbled accent sounds broken to screen reader users.Moderate impact
Cost to fixA one-line fix in the shared page template.High impact

Fixing it in code

A made-up language code

Don't

<html lang="english">

A screen reader says: “Read with the screen reader's default voice, which may be the wrong language.”

Do

<html lang="en">

A screen reader says: “Read with an English voice.”

en is a real language code; english is not.

A country used instead of a language

Don't

<html lang="au">

A screen reader says: “Read with the default voice — `au` is not a language.”

Do

<html lang="en-AU">

A screen reader says: “Read with an Australian English voice, if one is installed.”

The language comes first, then the country: en-AU.

Designer's handoff note

Note the page language in your handover, especially for sites in more than one language.

Quick test

Checklist

Pass
The value is a real language code, like `en` or `en-AU`.
Fail
The value is a word, a typo or a country code, like `english` or `au`.

Check these at the same time

What a green scan still misses

A scanner checks the code is real. It can't tell if it matches the language the page is actually written in.

Reference

Rule ID
html-lang-valid
Raised by
  • axe-core: “<html> element must have a valid value for the lang attribute”
WCAG
Other standards
EN 301 549 9.3.1.1 · RGAA 8.4.1
Last reviewed
14 October 2026