Skip to main content
Understandable WCAG 3.1.2

3.1.2 Language of Parts

The human language of each passage or phrase in the content can be programmatically determined, except for proper names, technical terms, and words of indeterminate language.

Level AA Moderate WCAG 2.0 (new) WCAG 2.1 WCAG 2.2
valid-lang

What this rule means

WCAG 3.1.2 extends 3.1.1 by requiring that language changes within a page are also marked up. When a primarily English page includes a French quotation or a Turkish paragraph, those sections need a lang attribute on the containing element so assistive technology can switch pronunciation engines.

Exceptions exist for proper names (e.g., "François"), technical terms that have become part of the base language, and words whose language cannot be determined. Common loanwords that are widely used in the page language do not need separate marking.

Why it matters

When a screen reader encounters text in a different language without a lang attribute, it applies the pronunciation rules of the page language. A French phrase read with English pronunciation is difficult or impossible to understand. Marking language changes allows the screen reader to switch voices or pronunciation engines seamlessly.

This is especially important for multilingual content, academic writing with citations in other languages, and sites that serve diverse linguistic communities.

Related axe-core rules

  • valid-lang — Ensures the lang attribute on elements uses a valid BCP 47 language tag.

How to test

  • Scan the page content for phrases, paragraphs, or sections in a language other than the page default.
  • Inspect those elements to verify they have a lang attribute with the correct language tag.
  • Use a screen reader to navigate through multilingual sections and confirm pronunciation switches occur correctly.
  • Run axe to catch invalid lang values on inline elements.

How to fix

Add a lang attribute to any element that contains text in a different language from the page default:

Bad practice

<!-- French text on an English page with no lang marker -->
<p>The motto of the Olympics iş <em>Citius, Altius, Fortius</em>.</p>

<!-- Turkish paragraph on an English page without lang -->
<blockquote>
  Erişilebilirlik bir hak, luks değil.
</blockquote>

Good practice

<!-- French text properly marked -->
<p>The motto of the Olympics iş <em lang="la">Citius, Altius, Fortius</em>.</p>

<!-- Turkish paragraph properly marked -->
<blockquote lang="tr">
  Erişilebilirlik bir hak, luks değil.
</blockquote>

<!-- Multiple languages in a single section -->
<p>In German, accessibility iş called <span lang="de">Barrierefreiheit</span>,
   which literally means "freedom from barriers".</p>

Common mistakes

  • Forgetting to mark quoted text in a foreign language.
  • Over-marking common loanwords that are part of everyday usage (e.g., "café" in English does not need lang="fr").
  • Using an incorrect language tag — Latin phrases need lang="la", not lang="it" or lang="fr".
  • Marking only block-level language changes but missing inline phrases.
  • Not updating lang attributes when content is dynamically loaded in a different language.

Resources