What this rule checks
Ensure the lang attribute of the <html> element has a valid value.
Why it matters
WCAG 3.1.1 requires the page language to be set with a valid code.
How to fix it
- Change the lang attribute on the <html> element to a valid code such as "en" or "en-US".
How to check the fix
- Re-scan and confirm html-lang-valid passes.
How FixReports finds it
Our scan runs the axe-core rule html-lang-valid in a real Chrome browser on every page it tests, and reports each failing element with its page, its markup and, where it applies, a screenshot.
An automated test confirms that this specific problem is present. It can't tell whether the rest of the page is accessible: some barriers only show up when a person checks the page.