HTML XML Lang Mismatch
Checks that lang and xml:lang attributes match on html element
Checks that lang and xml:lang attributes match on html element
| Rule ID | a11y/html-xml-lang-mismatch |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 6/10 |
Solution
If both lang and xml:lang are present on the <html> element, they must have the same base language. Mismatches can cause screen readers to announce content in the wrong language. Typically, you only need lang for HTML5 documents.
Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["a11y/html-xml-lang-mismatch"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/html-xml-lang-mismatch"]
disable = ["*"]