How to fix: Missing page language declaration
Missing page language declaration is a common WCAG A accessibility failure that automated scanners flag and that EAA enforcement authorities take seriously. Here is what triggers it, why it matters, and the concrete fix.
Why it matters and how to fix it
Screen readers pick a pronunciation engine from the page language. Without lang, the wrong voice may read the page. WCAG 3.1.1 (Language of Page) requires the page language to be set.
Set lang on the root <html> element using a valid BCP-47 code such as "en" or "fr".
Re-run the scanner after the fix to confirm zero violations on this rule. Add a unit or e2e test that asserts the relevant attribute is present so the issue cannot regress silently.
Guidance, not legal certification
Scan results are automated accessibility guidance, not legal advice or a certified conformance opinion. Always pair an automated scan with manual expert review.
Frequently asked questions
Will my site be fined just for this issue?
Single issues are rarely fined directly. Authorities usually require remediation within a deadline; ignoring the notice can lead to administrative fines.
How does the scanner detect this?
We run axe-core rules against the rendered page and surface every violation with the matching WCAG criterion and the impacted DOM selector.