Language of Page
Tier 1 ยท The normative floor
Baseline compliance
What the normative text of WCAG 2.2 requires, and nothing more. Only a failure of this tier is a WCAG failure.
The bare minimum
The default human language of each page can be programmatically determined. (In HTML, W3C's sufficient technique is the lang attribute on the html element; techniques are informative.)
Normative text
Verbatim from WCAG 2.2, W3C Recommendation 12 December 2024. Underlined terms are defined below.
The default human language of each web page can be programmatically determined.
Known failures
These fail this criterion or a related one named in the text. Log them as WCAG failures.
- A lang value that doesn't match the page's language, such as a template's lang="en" on a French page, means the default language isn't programmatically determined correctly.
Not required by the normative text
Common claims that this criterion does not support. Don't log these as WCAG failures.
- A region subtag such as en-US. A primary language code is enough.
Definitions used (3)
Glossary definitions are normative. Their notes are informative.
- human language
-
language that is spoken, written or signed (through visual or tactile means) to communicate with humans
Informative notes (1)
See also sign language.
- web page
-
a non-embedded resource obtained from a single URI using HTTP plus any other resources that are used in the rendering or intended to be rendered together with it by a user agent
Informative notes (2)
Although any "other resources" would be rendered together with the primary resource, they would not necessarily be rendered simultaneously with each other.
For the purposes of conformance with these guidelines, a resource must be "non-embedded" within the scope of conformance to be considered a web page.
- programmatically determined
-
determined by software from author-supplied data provided in a way that different user agents, including assistive technologies, can extract and present this information to users in different modalities
Tier 2 ยท The gap
Usability & user impact
Where content can meet this criterion and still make things harder for people with disabilities. These are not failures of SC 3.1.1, so raise them as usability defects. Known failures, including failures of related criteria, are listed in Tier 1.
A correct but generic code, such as en with no region, can't tell a screen reader which accent or spelling conventions to use.
Tier 3 ยท The golden path
Recommended best practice
The pattern that meets the floor, closes the gap, and avoids audit disputes. A recommendation, not a requirement.
Set lang from the content's actual language in your templates and CMS, not as a hard-coded default.
W3C's Understanding document and techniques for SC 3.1.1 โ are informative: sufficient techniques show ways to pass, and documented failures show common ways to fail, but neither changes what the criterion requires.
How SC 3.1.1 maps to the WCAG 3 draft
From this site's reviewed map to the WCAG 3 editor's draft. It's an interpretation: W3C has not published a mapping.
Successor provisions
From WCAG 2.2, section 5.1: โThe main content of WCAG 2.2 is normative and defines requirements that impact conformance claims. Introductory material, appendices, sections marked as "non-normative", diagrams, examples, and notes are informative (non-normative). Non-normative material provides advisory information to help interpret the guidelines but does not create requirements that impact a conformance claim.โ