lang attribute must have a valid value

How to fix the valid-lang accessibility rule. Language.

What this rule checks

Ensure lang attributes have valid values

Who is affected

A lang attribute on part of the page has an invalid language code.

How to fix it

Use a valid code such as "fr" or "es" on that element.

WCAG success criteria

When this rule fails, the page fails:

Find it on your own page

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools.

More detail