What Good Looks Like
This layout uses a base <html lang="en"> declaration, but also wraps specific French words in <span lang="fr">. The screen reader fluently swaps its pronunciation engine on the fly.
"Accessibility isn't extra work. Accessibility is already here, waiting for you to notice."
What happens when your website tries to speak English with a heavy, robotic French accent?
According to the 2026 WebAIM Million report, the failure to declare a base document language affects 13.5% of home pages.
While this is the lowest percentage on the "Fix the Six" list, its impact is profound. Screen readers use native text-to-speech pronunciation engines tailored to specific languages. If a developer forgets to add the lang attribute to the opening <html> tag, the screen reader assumes the page is written in the user's default system language. The resulting auditory mismatch can make a page entirely impossible to comprehend.
Read the full Document Language data in the WebAIM Million Report.
To demonstrate WCAG Success Criterion 3.1.1 (Language of Page) and 3.1.2 (Language of Parts), we've created a mock bilingual restaurant menu featuring both English descriptions and French dish names. You will be able to read along with our Screen Reader Simulator to hear how crucial this tiny, invisible HTML attribute truly is.
This layout uses a base <html lang="en"> declaration, but also wraps specific French words in <span lang="fr">. The screen reader fluently swaps its pronunciation engine on the fly.
This layout omits all language attributes. The screen reader attempts to read French words using harsh English phonetic rules, completely butchering the beautiful menu.
Experience the Accent TrapDeclaring your document's language is a fundamental HTML best practice that extends far beyond just screen reader accessibility. It unlocks several "free" features:
Browsers like Chrome look for the lang attribute to determine whether they should offer the user an automatic "Translate this page" prompt. Without it, the browser has to guess.
Search engines use the language declaration to serve your page to the right audience. If you want your English page to rank well for English queries, you must explicitly declare it.
Certain characters render differently depending on the language (e.g., Chinese vs. Japanese ideographs). The lang attribute ensures the browser selects the correct typographic glyphs.