Error · html-has-lang
The page doesn't declare its language
Lighthouse / axe call it: <html> element must have a lang attribute · <html> element does not have a [lang] attribute
Screen readers guess the language and read Spanish with an English voice (or vice versa): unintelligible.
Who it leaves out: blind people (screen readers)🔎 also SEO
How to fix it
Declare the language once. Code included, verified.
In the code
Add lang="xx" to <html> (e.g. <html lang="es">) so screen readers use the right pronunciation.
✓ Our scanner writes and tests this correction for you.
Where to fix it without code
If your site runs on one of these platforms, the fix is in the admin panel:
WordPress:
Settings → General → Site Language. Pick the language of your content and save.Shopify:
Settings → Languages → make sure the default language matches your store's content.Wix:
Settings → Language & Region → Site language.Squarespace:
Settings → Language & Region → Site language.Webflow:
Project Settings → General → Localization / Language code.Odoo:
Website → Configuration → Settings → Languages: set the default language to the one your pages are written in (this site declares one language but is served in another).
Don't want to fix this by hand, element by element?
Enter your address. In about a minute you get every failure on the page explained, and the corrected code, already tested in a browser, for each element we can fix. Free, no account.
The full report covers the pages that matter (checkout, cart, contact) and every fix, for $15 once or with monitoring.
Related errors
Automated testing covers roughly half of WCAG criteria; a full conformance claim also requires manual review. Technical information, not legal advice.