Accessibility

Why Screen Readers Need the Lang Attribute to Work Correctly

A screen reader can only pronounce your content correctly if it's told, explicitly, what language it's reading.

What it is

A screen reader is software used by blind and low-vision people that reads a page's content aloud, converting text into speech. To do that correctly, it needs to know which language's pronunciation and voice to use β€” French words pronounced with French phonetics, English words with English phonetics, and so on β€” and it gets that information from the lang attribute set on the page's <html> tag.

This is the same attribute covered from a broader technical and SEO angle in our other lang attribute guide β€” here, the specific focus is what happens for someone actually relying on a screen reader when it's missing or wrong.

Why it matters

Without a correctly set lang attribute, a screen reader has to guess which language and voice to use, and a wrong guess produces genuinely strange, sometimes unintelligible results β€” an English page read aloud with foreign pronunciation rules, for instance, can turn familiar words into something that no longer sounds like real speech at all. This isn't a minor inconvenience for someone depending on that reading to access your content at all; it can make a page functionally unusable.

This single attribute is one of the most impactful, lowest-effort accessibility fixes available precisely because of that gap between how small the fix is (one word, in one tag) and how completely it can break the experience for a screen reader user when it's wrong.

How to fix it

  1. Confirm the <html> tag includes a lang attribute matching the page's actual language, e.g. <html lang="en">.
  2. For a site with content in multiple languages, make sure each specific page's lang attribute matches that page's own language, not a single site-wide default.
  3. If a specific section within a page switches language (a quoted phrase in another language, for example), that section can carry its own lang attribute too, though the page-level one is the most important to get right first.
  4. Most website builders set this automatically based on your site's overall language setting β€” check that setting rather than editing code directly if you're on one of these platforms.
  5. If possible, actually test the page with a free screen reader (like NVDA on Windows, or VoiceOver built into macOS/iOS) to hear how it's read aloud.

Check whether your own site has this problem

Launch Readiness scans your site for this and ~50 other pre-launch issues in seconds β€” free, no signup.

Run a free check