Skip to content

Rule · Accessibility

<html lang> is not a valid language tag

a11y/html-lang-validerrorvoid a11yupdated

Why it matters

Screen readers and translation tools ignore an invalid lang value and fall back to the user's default language, mispronouncing the content.

How to fix it

Use a valid BCP 47 language tag such as en, en-GB or pt-BR.

Example

tsx
<html lang="en-GB">

References

void a11y reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.