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 inlinelangattribute, 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
langvalue to pick the correct table -- a French passage markedlang="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
langon 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
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>
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>
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>
We met at the rendezvous point near the café.
✔ "rendezvous" and "café" are adopted English words -- no lang attribute needed
How to Fix It
- 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 alangattribute. - 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 thelangattribute for the synthesizer. Example:<span lang="de">Schadenfreude</span>. - Put
langdirectly on block elements for longer passages. For a full paragraph, pull quote, or list item in another language, addlangto the<p>,<blockquote>,<li>, or<div>itself rather than nesting a<span>inside. The attribute inherits down the subtree until anotherlangoverrides it. - Use valid BCP 47 language tags. Common subtags:
frFrench,deGerman,esSpanish,jaJapanese,zhChinese,arArabic,laLatin. Region subtags are allowed where the pronunciation differs meaningfully (en-USvsen-GB,pt-BRvspt-PT). - Do not mark the exceptions. Proper names (
Bordeaux,Pierre), technical terms (Homo sapiens,hertz), words of indeterminate language, and adopted vernacular (rendezvous,sushi,karaokein English;weekend,podcastin French) are out of scope -- tagging them produces a jarring voice swap for a word the reader already knows [1]. - 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
langattribute 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] 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 ↩ ↩ ↩ ↩