ACT Rule ucwvc8 · proposed
HTML page language subtag matches default language
This is the one that checks the declaration against reality. It works out which language the page is mostly written in and compares that with what the lang attribute claims.
A tool can decide this one on its own, which is why it turns up in scanner output. The rule is proposed, so it has not yet been implemented in full by a tool and reviewed by a W3C working group, and the wording can still change.
What passing this rule proves
This is one of only four rules in the whole published set where W3C says a passing result satisfies the criterion outright. If the rule applies to your page and every result passes, 3.1.1 Language of Page is satisfied. A failing result means it is not. On 59 of the other live rules a pass only means no failure of that kind was found, and the remaining 24 name no criterion for a pass to clear.
The two lighter language rules exist because presence and validity are cheap to check, and because neither one settles anything. This is the rule that settles it. If the page carries no lang attribute at all the rule is inapplicable, and an inapplicable result sends the criterion back to needing further testing rather than clearing it.
The criteria this rule is a test for
These are the criteria the rule names as its own conformance requirement. Each one is a far bigger question than this rule asks, and our page for it sets out what the whole criterion covers.
- 3.1.1 Language of Page Level A
The normative rule text lives at W3C
What the rule applies to, and exactly what it expects, is published by W3C and can change. We link to it rather than restate it, so nothing here can quietly fall out of date against the source. Read rule ucwvc8 at W3C.
The page must declare what language it is in
A screen reader picks its pronunciation rules from the language the page declares. Get it wrong and English is read with French rules, or the other way round. The result is not slightly off. It is unintelligible.
The declaration has to be a real language tag. A passage in another language has to say so on the element that contains it.
The default in a template is the usual culprit. A site translated into German keeps lang="en" from the starter. Every page is read aloud in English pronunciation rules, making it incomprehensible.
Fixes that satisfy it
If this rule fails on your site, these are the techniques that put it right.
Other rules W3C files under the same criteria
Each of these asks a different question about the same part of the standard. Passing all of them is still not the same as satisfying the criterion.
- HTML page has lang attribute A tool can check this
- HTML page lang attribute has valid language tag A tool can check this
All 87 ACT rules are grouped by the criteria they test, and 24 of them decide nothing about WCAG on their own. Run a free scan to see which of these your own pages trip.