WCAG 3.1.2 Language of Parts
Updated October 14, 2026 · 3 min read
- Level
- AA · WCAG 2.0
- EN 301 549
- 9.3.1.2
- What the checker tests
- Partly automated: Some text is marked with a wrong language code
- Official text
- Understanding 3.1.2 Language of Parts (W3C, in English)
Success criterion 3.1.2 helps people who use screen readers, braille displays or text-to-speech. When the language changes inside a page, the software should switch pronunciation too; otherwise a Polish customer review on an English page is read with English rules and turns into noise. It is level AA and appears in EN 301 549 as clause 9.3.1.2.
What the criterion requires
The human language of each passage or phrase must be programmatically determined. In HTML you add a lang attribute to the element that holds the other-language text, for example <blockquote lang="de">…</blockquote> or <span lang="fr">…</span>. Text without its own lang inherits the page language from 3.1.1.
A phrase can be a single word. The official exceptions:
- proper names (brand, product and place names);
- technical terms;
- words of indeterminate language;
- words or phrases that have become part of the vernacular of the surrounding text, such as "café" or "know-how" in English.
Typical failures on an online shop
- the language switcher lists "Deutsch", "Polski", "Українська" with no
langon each link; - customer reviews or imported supplier descriptions in another language shown on a product page;
- legal notices, size guides or care instructions copied in another language;
- a marketing slogan in English on a German store, written as a full sentence;
- a
langattribute with an invalid code, such aslang="ua"orlang="en_US".
How to check it
Automated: our checker runs the valid-lang rule, which reports lang attributes whose value is not a valid language code. It cannot detect text in another language that has no lang attribute — that is the more common failure and needs a manual check.
By hand: read through the page template, the footer and the language switcher, then a few product pages with reviews. For each sentence or phrase in another language (outside the exceptions above), inspect the element and confirm it has the right lang value.
How to fix it
- Add
langto each language-switcher link, matching the language of its label. - Wrap other-language reviews or descriptions in an element with
lang; if reviews come from an app, check whether it can output the review language. - Use valid codes:
ukfor Ukrainian,en-USwith a hyphen, not an underscore. - Prefer translating copied text over marking it, when visitors are expected to read it.
Related criteria
- 3.1.1 Language of Page — the default language of the page.
- 4.1.2 Name, Role, Value — accessible names that assistive technology reads.
- All rules our checker runs.
Frequently asked questions
Do I need to mark every foreign word?
No. Proper names, technical terms, words of indeterminate language and words that have become part of the surrounding language are exempt. A whole sentence or passage in another language needs marking.
Does a language switcher need lang attributes?
Usually yes. Links such as "Deutsch" or "Polski" in an English page are words in another language, so each should carry its own lang attribute, for example lang="de".
What does the automated check find for 3.1.2?
It finds lang attributes with invalid values. It cannot find text in another language that has no lang attribute at all; that needs a person who reads the page.