• Success Criterion 3.1.2
  • Conformance level AA

No Way to Programmatically Tell Which Language a Passage Uses

3.1.2 — Language of Parts

Scenario

Setting

A bank's mobile money-transfer screen

What’s wrong

A Spanish-language help article is embedded inside the English transfer screen with no lang attribute marking the switch, so a screen reader keeps reading it with English pronunciation rules.

Example

<div class="help-panel">
  <h2>Need help?</h2>
  <p>Para transferencias internacionales, el tipo de cambio se actualiza cada hora.</p>
</div>

Why it matters

A screen reader keeps using English pronunciation on the embedded Spanish sentence, turning exchange-rate guidance into a garbled string a user can't act on.

How to test

Inspect any passage in a different language from the page: check whether its containing element has its own correct lang attribute — if not, it fails.

How to fix

Tag any embedded passage with lang the moment it switches language, even inside an otherwise single-language page.

<div class="help-panel">
  <h2>Need help?</h2>
  <p lang="es">Para transferencias internacionales, el tipo de cambio se actualiza cada hora.</p>
</div>

Outcome

A user reviewing transfer help hears the Spanish passage switch to a correctly accented voice.

Who is affected

Screen reader users who don't read Spanish visually rely entirely on correct pronunciation to even recognize the passage is in another language.

Learn more