Skip to content

Rule · Accessibility

<html> has no lang attribute

a11y/html-has-langerrorvoid a11yupdated

Why it matters

Screen readers pick pronunciation rules from lang; without it text may be read in the wrong language. Translation tools also rely on it.

How to fix it

Set the page language on the root element.

Example

tsx
<html lang="en">

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.