Level AA

Without inline lang attributes, a screen reader keeps the page-default phonetic engine loaded across a foreign phrase -- the tokens come out as English phonemes applied to non-English spelling and are unrecognizable to the listener

3.1.2 Language of Parts

In Plain Language

3.1.2 Language of Parts (Level AA) extends 3.1.1 Language of Page: when any passage, phrase, or word inside a page is written in a language different from the page default declared on <html lang="...">, that run of text must carry its own lang attribute on the containing element [1].

Exceptions defined by the W3C Understanding document: proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the surrounding language ("rendezvous" in English, "podcast" in French) do not require a lang attribute [1].

Why It Matters

  • Screen readers bind pronunciation to lang. When NVDA, JAWS, or VoiceOver encounters an inline lang attribute, the synthesizer swaps phonetic engines for that token range -- from English rules to German rules, for example -- then swaps back at the closing tag. Without the switch, "Schadenfreude" is fed into an English text-to-speech engine and emerges as English phonemes mapped onto German spelling, which is unrecognizable to the listener.
  • Refreshable braille displays select translation tables by language. Contracted braille (Grade 2) differs per language, and the braille driver uses the active lang value to pick the correct table -- a French passage marked lang="fr" is translated through the French braille table, not the English one.
  • 3.1.2 is the passage-level extension of 3.1.1 Language of Page. 3.1.1 covers the document default on <html>; 3.1.2 covers every element below it whose natural language differs from that default.
  • The exceptions exist because forcing lang on adopted words would create markup churn without accessibility benefit -- a synthesizer pronouncing "rendezvous" through a French engine inside English prose produces a jarring phonetic swap for a word English speakers already know [1].

Examples

Do: Mark inline language changes

The French phrase c'est la vie means "that's life."

✔ Screen reader switches to French pronunciation for the marked phrase

<p>The French phrase
  <span lang="fr">c'est la vie</span>
  means "that's life."</p>
Don't: Foreign text with no lang attribute

The French phrase c'est la vie means "that's life."

✘ Screen reader reads French words with English pronunciation rules

<!-- FAILS: no lang attribute on the French phrase -->
<p>The French phrase c'est la vie
  means "that's life."</p>
Do: Block-level language sections

Die Grenzen meiner Sprache bedeuten die Grenzen meiner Welt.

✔ Entire blockquote marked as German -- screen reader uses German pronunciation throughout

<blockquote lang="de">
  <p>Die Grenzen meiner Sprache bedeuten
    die Grenzen meiner Welt.</p>
</blockquote>
OK: Vernacular terms need no marking

We met at the rendezvous point near the café.

✔ "rendezvous" and "café" are adopted English words -- no lang attribute needed

How to Fix It

  1. Locate runs of non-default-language text. Compare each passage, phrase, or quoted term against the language declared on <html lang="...">. Any token whose natural language differs from that default and is not covered by the exceptions below needs a lang attribute.
  2. Wrap inline runs in <span lang="xx">. For a single foreign word or phrase inside a sentence, use <span> because it has no semantic side effects -- it only carries the lang attribute for the synthesizer. Example: <span lang="de">Schadenfreude</span>.
  3. Put lang directly on block elements for longer passages. For a full paragraph, pull quote, or list item in another language, add lang to the <p>, <blockquote>, <li>, or <div> itself rather than nesting a <span> inside. The attribute inherits down the subtree until another lang overrides it.
  4. Use valid BCP 47 language tags. Common subtags: fr French, de German, es Spanish, ja Japanese, zh Chinese, ar Arabic, la Latin. Region subtags are allowed where the pronunciation differs meaningfully (en-US vs en-GB, pt-BR vs pt-PT).
  5. Do not mark the exceptions. Proper names (Bordeaux, Pierre), technical terms (Homo sapiens, hertz), words of indeterminate language, and adopted vernacular (rendezvous, sushi, karaoke in English; weekend, podcast in French) are out of scope -- tagging them produces a jarring voice swap for a word the reader already knows [1].
  6. Verify with a screen reader. Load the page in NVDA plus a multilingual voice pack (eSpeak NG, Vocalizer) or VoiceOver with the relevant voice installed. The synthesizer should swap voices or phonetic rules at the boundaries of each tagged element. If pronunciation stays English across a French phrase, either the lang attribute is missing, the tag value is invalid, or the user's screen reader has no voice installed for that language -- confirm the first two before blaming the third.

References

  1. [1] W3C (2023). Understanding Success Criterion 3.1.2: Language of Parts. W3C, Accessed 2026-04-07. https://www.w3.org/WAI/WCAG22/Understanding/language-of-parts.html