Language changes not indicated
The issue
WCAG success criterion 3.1.2 requires that each language change in a page's content be indicated in the source code via the lang attribute on the HTML element containing the foreign-language text. Without this indication, screen readers use the pronunciation rules of the page's main language (defined on the html tag) to read the foreign text, producing incorrect and often incomprehensible pronunciation. When a screen reader configured in English encounters a French phrase without a language change indication, it pronounces it with English phonetic rules, distorting every sound. For isolated, common words, the user may guess the meaning. But for entire sentences in French, German, Spanish, or any other language, the result is totally incomprehensible. Imagine a quote in French read with an exaggerated English accent, every sound distorted by inappropriate pronunciation rules: this is what screen reader users experience when language changes are not marked. This problem is widespread because many websites mix languages without attention. Technical English terms in a French article (cloud computing, machine learning, responsive design), foreign-language citations, product or brand names, foreign addresses and place names, bilingual content blocks: all these cases require language markup. The fix is simple: wrap foreign-language text in a span (or any other appropriate element) with the lang attribute corresponding to the ISO 639-1 language code. For example, <span lang="fr">bonjour</span> tells the screen reader to switch to French pronunciation for that word.
Does your site have this issue?
106 RGAA criteria analyzed in 5 minutes by our AI.
Impact on users
For a screen reader user, foreign-language text read with incorrect pronunciation is at best annoying, at worst incomprehensible. Modern speech synthesizers are very faithful to each language's phonetics, which means they rigorously apply English rules to French text: the result is an audio mess. Blind people who do not know the foreign language in question are even more impacted because they cannot compensate by guessing words through language knowledge. Braille display users are also affected: the braille table used depends on the declared language. English text displayed with a French braille table may produce incorrect characters. In summary, language markup is a small technical effort with a significant impact on experience quality for assistive technology users.
Code example
<html lang="en">
<body>
<p>Subscribe to our newsletter for updates.</p>
<blockquote>
"Le pouvoir du Web est dans son universalite."
— Tim Berners-Lee
</blockquote>
<p>Our solution uses machine learning
and Kubernetes for data analysis.</p>
<footer>
<p>Fait avec amour a Paris</p>
</footer>
</body>
</html><html lang="en">
<body>
<p>Subscribe to our newsletter for updates.</p>
<blockquote lang="fr">
"Le pouvoir du Web est dans son universalite."
— Tim Berners-Lee
</blockquote>
<p>Our solution uses machine learning
and Kubernetes for data analysis.</p>
<footer>
<p><span lang="fr">Fait avec amour</span> in Paris</p>
</footer>
</body>
</html>Frequently Asked Questions
Must I mark every common foreign word (email, web, blog)?
How do I indicate the language of a link whose text is in a foreign language?
What language codes should I use?
Is the lang attribute important for SEO?
Does your site have this issue?
Scrutia audits your site against WCAG 2.1 AA criteria in 5 minutes. Keyboard navigation, ARIA components, visible focus, contrasts, and much more.
Run a free audit