Accessibility Small

Add a language attribute

Screen readers use the lang attribute on <html> to choose which pronunciation rules and voice to use. Without it, or with an incorrect value, a screen reader may read English content with a different language's pronunciation rules, making the page difficult or impossible to understand for blind and low-vision visitors.

Why it matters

Without a declared language, screen readers may mispronounce every word on the page, making the site effectively unusable for blind and low-vision visitors.

How to fix

  1. 1 Add a lang attribute to the <html> tag matching the page's primary language.
  2. 2 Use the correct region subtag when it matters (e.g. lang="en-GB" vs "en-US") so pronunciation and locale-specific behavior are accurate.
  3. 3 Verify with a screen reader or an HTML lang validator that the declared language matches the actual page content.

Common mistakes

  • Leaving the attribute off entirely on legacy pages that were never audited for accessibility.
  • Declaring a language at the top level but not scoping inline lang attributes to passages actually written in a different language.
  • Setting the wrong regional variant (e.g. lang="en" for content that is specifically British English idioms and spelling), which is a smaller but still real pronunciation mismatch.

How to verify

  1. 1 View page source and confirm the <html> tag declares a lang attribute matching the actual page language.
  2. 2 Test with a real screen reader (VoiceOver, NVDA) and confirm pronunciation sounds correct.
  3. 3 Run an automated accessibility checker (e.g. axe, Lighthouse) and confirm no missing-lang violations are reported.

Related checks

Ready to see where you stand?

Scan your site and get your Engineering Score with a prioritized roadmap in under a minute, no signup required.

Scan your site