The “Incorrect Page Language Check” evaluates whether the lang and / or xml:lang attributes are applied correctly and consistently on the <html> element, matching the page language.
Example outcome
I observed that the lang and / or xml:lang attributes are being used incorrectly.
Impact
Visual Impairments: Screen readers may not use the correct pronunciation engine if the language attribute doesn’t match the actual content. If conflicting values are present, the tech may fall back to a default or choose unpredictably.
Cognitive Disabilities: Comprehension tools or overlays may not activate correctly or use the wrong rules for parsing or presenting text.
Auditory Disorders: If content is read in the wrong language or voice, understanding can become significantly harder.
Fixes
To address incorrect page language:
Determine the language in which the page’s content is mainly presented.
Verify which is the correct language code for that language.
Change the language code in the lang and / or xml:lang attribute of the <html> tag.