Skip to content

Why screen readers need the page language

Accessibility1 min readFixes check lang-attr-a11y

Without a lang attribute, screen readers guess the language and mispronounce everything. One attribute on the html element fixes it.

Step by step, with screenshots: Accessibility checker results — fixing the ten findings we see most →

Check your own site

Runs this check and the other 186, free, in about 45 seconds.

What a passing site looks like

  • The page declares its languagewarning · −1 ptseffort S

The page does not declare its language

Why it matters. Screen readers pick their pronunciation rules from the lang attribute on <html>. Without it, Croatian text may be read with English rules and become impossible to follow.

How to fix it.
  1. Add lang to the html element, for example <html lang="hr"> or <html lang="en-GB">.
  2. In WordPress the theme prints it from Settings → General → Site Language.

Filed under Accessibility. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.