Fix WCAG 3.1.1 Language of Page on Next.js
The page language must be programmatically set.
How to fix it
- 01
Locate the React component rendering the affected element.
- 02
Apply the WCAG 3.1.1 fix: Add <html lang="en"> (or correct ISO code) to your root layout.
- 03
Add an automated test with @axe-core/react in dev to catch regressions.
Why it matters
WCAG 3.1.1 is a Level A success criterion. Level A failures appear in most ADA web-accessibility lawsuits — over 5,000 were filed in 2025. Typical settlements run $5,000–$30,000 plus remediation cost.
Verify the fix
Run a free scan after deploying. Issue should clear and your risk score should drop.
Same fix on other platforms: Shopify · WordPress · Webflow · Squarespace