Skip to content
easeweb
Search topics

Passages in another language read with the wrong voice

A product page shows a French customer review and a language switcher with no lang of their own, so a screen reader reads both with English pronunciation.

WCAG 2.2
SC 3.1.2AA
Required by
Section 508 · EN 301 549 (EU)
Broken <p class="review-text">Parfaite pour le café…</p>
The accessibility problem illustrated: No vision:What did that review say?
01

The problem

Screen reader and braille users get passages in another language read with the page's pronunciation rules, which can make them impossible to follow

02

Try it

Listen to the French review and the language links

Press Listen on each review and on the language links to hear them with the voice their lang picks, if your device has one; the panel shows the voice and roughly how it sounds.

Broken Can you fix this?

BrokenA French review and a language switcher with no lang

Enamel camping mug

  • Light, tough, and keeps tea hot. Sam, Leeds
  • Parfaite pour le café du matin au camping. Camille, Lyon

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Mark each passage in another language with its own lang

Before
BrokenA French review and a language switcher with no lang
<html lang="en">…<h1>Enamel camping mug</h1>…<ul class="reviews">  <!-- rendered from the reviews feed -->  <li>    <p class="review-text">Light, tough, and keeps tea hot.</p>    <p class="reviewer">Sam, Leeds</p>  </li>  <li>    <p class="review-text">Parfaite pour le café du matin au camping.</p>    <p class="reviewer">Camille, Lyon</p>  </li></ul>…<footer>  <nav aria-label="Language">    <a href="/en/" aria-current="true">English</a>    <a href="/fr/" hreflang="fr">Français</a>    <a href="/de/" hreflang="de">Deutsch</a>    <a href="/es/" hreflang="es">Español</a>  </nav></footer>
What is wrong3 points
  • The French review is read with English pronunciation. It has no lang of its own, so it inherits lang="en" from the page.
  • The three language names, Français, Deutsch and Español, are read with English pronunciation too, for the same reason.
  • The links' hreflang doesn't help: it describes where each link goes, and changes nothing about how its text is read.
After
FixLang on each passage
<html lang="en">…<h1>Enamel camping mug</h1>…<ul class="reviews">  <!-- each li takes the language stored with its review -->  <li lang="en">    <p class="review-text">Light, tough, and keeps tea hot.</p>    <p class="reviewer">Sam, Leeds</p>  </li>  <li lang="fr">    <p class="review-text">Parfaite pour le café du matin au camping.</p>    <p class="reviewer">Camille, Lyon</p>  </li></ul>…<footer>  <nav aria-label="Language">    <a href="/en/" aria-current="true">English</a>    <a href="/fr/" hreflang="fr" lang="fr">Français</a>    <a href="/de/" hreflang="de" lang="de">Deutsch</a>    <a href="/es/" hreflang="es" lang="es">Español</a>  </nav></footer>
How it is fixed3 steps
  1. Wrap each review in an element that carries the language stored with it. The French one is read with French rules, and the English text after it goes back to English.
  2. Give every review its lang, the English ones too, so a review in English stays English on the French version of the page.
  3. Put the lang of the language each name names on the link itself, beside the hreflang that describes its target.

This fixes the Before and passes 3.1.2.

04

Verify the fix

5 checks, no mouse.

Test with: Screen reader

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat when content from a new source, or a new language, is added.

How screen readers handle lang

Limits

This is a starting pattern, not a guarantee for every application. Screen readers switch voices only when a voice for that language is installed, and some let the user turn automatic language switching off; that is outside your control, but the markup must still be right. Some screen readers also try to guess the language from the text itself; a guess is least reliable for a short passage in the same letters as the page, and not every reader makes one, so it doesn't replace lang. Whether a word needs marking can be a judgement call: check the passages that matter with someone who reads that language if you can.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service