Page Language Check
Description
The “Page Language Check” evaluates whether the language of the page is marked correctly with the appropriate lang
attribute in the <html>
tag.
Example outcome
I observed that the webpage’s main language is marked as \"en\".
Impact
- Visual Impairments: Screen readers may misinterpret the content or pronounce words incorrectly if the language is not set properly.
- Cognitive Disabilities: Text-to-speech tools may speak in the wrong language, which could lead to confusion or difficulty understanding the content.
- Non-Native Speakers: Users who are not fluent in the default language of the page may struggle to understand content or experience improper pronunciation.
Fixes
To address inappropriate page language:
- Determine the language in which the page’s content is mainly presented.
- Verify which is the correct language code for that language.
- Add or change the language code in the
lang
attribute of the<html>
tag. - If there are some page parts in another language, specify the language for those using the
lang
attribute in the specific elements.