WCAG 3.1.2 — Language of Parts
A quoted phrase in another language inside an English page needs a `lang` marker so the screen reader switches voices for that span. Without it, "C'est la vie" gets read with English phonics — and no screen-reader user will recognise the phrase.
What this requires
The human language of each passage or phrase in the content can be
programmatically determined, except for proper names, technical
terms, words of indeterminate language, and words or phrases that
have become part of the surrounding text's vernacular. In practice
this means inline lang attributes on content that switches
language.
How AI coding tools fail this
When generating multilingual content — a blog post quoting a French
philosopher, a docs page with a German technical term, a product
description listing a Japanese place name — AI tools render the
foreign text without a lang wrapper. The page-level lang is set
correctly (3.1.1); the inline switch
is silent.
The second pattern: localised pages that mix locales. A Spanish
marketing page that quotes an English testimonial without
lang="en" on the quote. Screen readers force their default-locale
phonics across both languages.
The third: code samples and product names treated as foreign language. They aren't — proper nouns and technical terms are an explicit exception.
Edge cases
- Proper names don't need
lang. "París" in an English text is still pronounced as the user's screen reader pronounces "París" — marking it is unnecessary noise. - Borrowed words that have entered the language ("café",
"résumé", "data") don't need
lang. - Technical terms like CSS property names, code identifiers, and product names are exempt.
- Region tags (
lang="en-US",lang="pt-BR") help when pronunciation differs by region. - BCP 47 codes are the standard — two-letter ISO 639-1 with optional region.
How Jeikin handles this
The scanner can detect inline language switches via lexicon-based heuristics but the call is ultimately editorial. The dashboard surfaces suspected switches and lets the reviewer confirm or dismiss. The finding maps to WCAG 3.1.2.