Mark language changes with a lang attribute
When a page switches language mid-paragraph, the element holding the other language needs a lang attribute saying which one, and a screen reader changes pronunciation engine at that boundary. W3C lists H58 as sufficient for 3.1.2 Language of Parts on its own, with no partner technique, and 3.1.2 sits at Level AA, which puts this squarely inside what an audit checks. The primary code is the part that matters, so lang=fr does the job and lang=fr-CA is a refinement rather than a requirement. The exception is built into the rule itself. Proper names, technical terms, words of indeterminate language, and borrowings the surrounding language has absorbed, rendezvous and schadenfreude among them, are not language changes.
How we find it in an audit
A scanner confirms that every lang value is a real language code, which catches typos and invented values. It cannot find the French paragraph sitting in an English page with no lang at all, and that is the actual failure. So we read for language changes and check each one, with multilingual sites getting the closest look.
How affected users experience it
Unmarked French gets read with English pronunciation rules. Bonjour, je m'appelle comes out as noise a French speaker may not recognize as their own language, and nothing in the sound says whether the page is broken or the words are. With lang=fr on the quotation, the synthesizer changes voice and the sentence reads as French.
Passes vs. fails
Passes
<blockquote lang="fr">La perfection est atteinte quand il n'y a plus rien a retrancher.</blockquote>Fails
<blockquote>La perfection est atteinte quand il n'y a plus rien a retrancher.</blockquote>How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- Element with lang attribute has valid language tagA tool can check this
- HTML element language subtag matches languageA tool can check this
Other ways to satisfy this rule
2 guides on this site are filed under 3.1.2 Language of Parts. W3C lists this one as sufficient for that rule on its own. Implement it correctly, in a way your readers' software actually supports, and the rule is met.
This guide is our interpretation of W3C technique H58: Using language attributes to identify changes in the human language. W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.