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
- Confirm the
<html>tag includes alangattribute matching the page's actual language, e.g.<html lang="en">. - 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.
- If a specific section within a page switches language (a quoted phrase in another language, for example), that section can carry its own
langattribute too, though the page-level one is the most important to get right first. - 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.
- 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.