Last updated on May 6, 2026
My last post was on 3.1.1 Language of the page. We talked about telling the screen reader the main language of the page. It’s like setting the thermostat for the whole house.
But what if you have a guest room where the temperature needs to be different? Or a kitchen where the oven is on?
That’s 3.1.2: Language of Parts.
The Mix-Up
Sometimes, a page in English needs to quote a French poem, display a German brand name, or show a Japanese error message. If you don’t mark those specific chunks, the screen reader keeps using the “English thermostat” for the whole room.
Keep the main language set, and tag the guests.
Suddenly, a Spanish phrase like “¡Qué padre!” gets pronounced with an American twang. A German word like “Schadenfreude” sounds like “shod-en-froid.” It’s jarring. It’s confusing. It breaks the immersion.
The Fix: The lang attribute, again.
The solution is the same tool, just applied locally. Wrap the foreign text in a tag with the correct lang attribute:
<p>The Spanish phrase <span lang="es">¡Qué padre!</span> means "That's awesome!"</p>
Now, the screen reader switches accents just for that span. Voilà! The pronunciation snaps back to reality.
Why Do We Do This?
This isn’t just about sounding fancy. It’s about clarity.
- Screen Readers: They switch pronunciation rules instantly.
- Braille Displays: They might use different character sets for different languages.
- Translation Tools: They won’t try to translate the quote into the quote.
If your page is a polyglot, don’t force it to speak one language. Mark the parts. Let the assistive tech do its thing.
Keep the main language set, and tag the guests. It’s the polite thing to do.
Not every site will be presented in multiple languages and will not need these inline declarations. Under WCAG that is fine, there is no requirement of internationalization. However, there are more times you should be addressing the pronunciation of words that have been adopted into your site’s root language. If your language absorbs and adopts phrases from other languages, despite it being part of the root language lexicon, it should still be wrapped with a lang assignment.
Discover more from Nat Tarnoff
Subscribe to get the latest posts sent to your email.

Comments are closed.