Fix · Moderate · should fix soon

How to fix: missing lang attribute on <html>

Screen readers read content with the wrong language phonetics. Tells AT and translation tools what language to use.

WCAG references
3.1.1
Severity
Moderate

What it looks like in the wild

Screen readers read content with the wrong language phonetics.

The screen-reader user, keyboard user, or low-vision user encountering this issue does not get an error message. The page just stops working for them. Which is why this kind of bug rarely shows up in your error tracker; it shows up in support tickets, lawsuits, and abandoned conversions.

Why it fails WCAG

Tells AT and translation tools what language to use.

Map this back to 3.1.1 when you log the bug. Auditors and procurement teams expect that mapping; "broken" is not enough context.

The wrong pattern (avoid)

HTML
<html><head>...

The right pattern (copy this)

HTML
<html lang="en">
<!-- For inline language: -->
<p>Hello. <span lang="fr">Bonjour.</span></p>

Notes from real audits

  • Set in your root layout / template, not per page.

How to verify the fix

Shipping the change is not the same as passing 3.1.1. Re-run these checks against the page you edited before you close the ticket.

  • Inspect <html> in any browser DevTools.

An automated scan confirms the machine-testable half. Keyboard and screen-reader passes cover the half no scanner can judge — do both before claiming conformance.

What 3.1.1 requires

3.1.1 Language of Page (Level A, Understandable): The default human language of the page must be programmatically set via the lang attribute on <html>. Screen readers switch pronunciation, voice, and language rules based on this attribute. Without it, English assistive tech may read French content with English phonetics, making it incomprehensible.

  • <html> with no lang

    3.1.1
  • Generic lang="en" on a multilingual site without language switches

    3.1.1

Priority: Moderate

This will not stop a user completing a task on its own, but it accumulates. A page carrying several moderate findings degrades into one that is technically usable and practically exhausting — and an auditor counts them individually.

Because the cause is almost always a shared component rather than a single page, fix it where the component is defined and re-scan the whole site. Record 3.1.1 on the ticket verbatim: that string is what an auditor, a procurement questionnaire or a regulator will search for.

Related fixes

Find every accessibility issue on your site in 60 seconds.

Free public scan. No card. AI-generated fixes for every issue we find.