← All WCAG & EAA Fix Guides

serious EN 301 549 § 9.3.1.1

html-has-lang: Document <html> element must declare a valid lang attribute

Set a valid BCP-47 language code (e.g., lang="en", lang="de", lang="fr") on the root <html> element.

Why this matters for EAA & ADA compliance

Screen readers select pronunciation rules from <html lang>. Multi-market EU stores without accurate lang attributes read German or French pages with English phonetics.

Mapped standards: 3.1.1 Language of Page (Level A) • EN 301 549 § 9.3.1.1

Standard HTML Fix

Before (fails html-has-lang):
<!DOCTYPE html>
<html>
After (accessible source markup):
<!DOCTYPE html>
<html lang="en">

Shopify Liquid Fix

Before:
<html>
After:
<html lang="{{ request.locale.iso_code }}">

React / Next.js Fix

Before:
<html>
After:
<html lang={locale}>

Check your live site for html-has-lang right now

Public HTTPS URL (e.g. https://yourstore.com). Runs headless Chromium + axe-core + overlay detection.
Error: Enter a valid public website URL starting with https://