Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.squirrelscan.com/llms.txt

Use this file to discover all available pages before exploring further.

Checks that lang and xml:lang attributes match on html element
Rule IDa11y/html-xml-lang-mismatch
CategoryAccessibility
ScopePer-page
Severityerror
Weight6/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
[rules]
disable = ["a11y/html-xml-lang-mismatch"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/html-xml-lang-mismatch"]
disable = ["*"]