An English museum guide might include a visitor instruction in French. When the page identifies the language of that instruction, a screen reader can apply French pronunciation and then return to English for the surrounding text. People reading with a braille display can also benefit from the language information.
What does WCAG require?
Language of Parts (3.1.2) is a Level AA requirement in WCAG 2.0, 2.1, and 2.2. Software must be able to determine the language of passages and phrases. Text ordinarily inherits its language from the surrounding element or the page. When the language changes, identify it in the markup.
There is no minimum passage length. Even one word can need a language declaration if the author intends it to be read in another language. The criterion makes exceptions for proper names, technical terms, words whose language cannot be determined, and borrowed words or phrases that have become part of the surrounding language. For example, a French instruction in an English guide needs a declaration, while “café” used as an ordinary English word falls under the borrowed-word exception.
Common issues on multilingual pages
- An editor pastes a foreign-language quote and uses italics as the only cue.
- A language selector uses each language’s own name, but every link inherits the page’s default language.
- A French passage’s language tag is placed on a larger section that also contains English instructions.
How to mark a passage or phrase
Add a valid lang tag to the smallest element that contains the whole passage in that language. Use a paragraph or section for longer content, or a span for a phrase within a sentence. If an entire link is in another language, put lang on the link itself.
<p>The sign by the east entrance reads
<span lang="fr">Veuillez attendre ici.</span>
It asks visitors to wait there.
</p>
If you use a content editor, check that it preserves language attributes when you save and publish. For reusable components such as language selectors or bilingual notices, set the language for each entry in the component template.
How to test language changes
Automated checks can flag some invalid tags. Review multilingual content by hand to find unmarked changes and confirm that each tag matches the text it covers. Inspect the published markup and listen with a screen reader configured for automatic language switching and equipped with the relevant voices. Check that the surrounding text returns to its original language. Some screen reader modes, such as a links list, may lose language information when flattening text into a single name. Use the markup as evidence alongside what you hear.
Use SimplifyAccess Compliance Assessment to record which multilingual pages you reviewed and what you found for 3.1.2.
Related accessibility requirements
Language of Page (3.1.1) identifies the default language of the whole page. Unmarked passages inherit that default unless a containing element declares a different language.
