Accessibility Wiki

The page language must be a valid BCP-47 tag

Rule html-lang-valid · Document, language & navigation · impact serious · Static + live

↩ Back to the rules index · WCAG cross-reference

Why it matters

A malformed value (lang="english", lang="en_US") is not recognised, so AT cannot apply the right language profile.

How to fix

Use a well-formed BCP-47 tag: a 2–3 letter language subtag, hyphen-separated subtags (en, en-US, zh-Hant).

Example

✕ Fails
<html lang="english">
✓ Passes
<html lang="en">

WCAG success criteria

3.1.1 Language of Page — Level A

The default human language of the page must be set programmatically (<html lang>).

Understanding 3.1.1

Standards

This rule contributes to the following standards:

WCAG A EN 301 549 Trusted Tester ACT

Standard Criteria
EN 301 549 9.3.1.1
Trusted Tester v5 11.a
ACT (WCAG SC) 3.1.1

References

Generated from the EqualWeb accessibility engine’s rule metadata. Back to top ↑