| Rule ID | a11y/html-lang-valid |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/10 |
Solution
The lang attribute on<html> should be a valid BCP 47 language tag. Use two-letter ISO 639-1 codes like ‘en’ for English, ‘es’ for Spanish, ‘fr’ for French. You can add region subtags like ‘en-US’ or ‘en-GB’. This helps screen readers use correct pronunciation.
Enable / Disable
Disable this rule
squirrel.toml
Disable all Accessibility rules
squirrel.toml
Enable only this rule
squirrel.toml