| Title | Language Attribute Check |
|---|---|
| id | element_06 |
| type | true |
| elem | all |
| test | elementLang |
| score | 10 |
| level | AA |
| trust | 1 |
| ref | H58 |
| scs | 3.1.2 |
| dis | 43353 |
| result | passed |
The "Language Attribute Check" evaluates whether all HTML elements using the lang attribute declare a valid BCP 47 language tag.
I noticed that all elements with a lang attribute use a valid language tag.
- Visual Impairments: Screen readers may mispronounce words, especially in multilingual content. Misinterpretation of tone or meaning (e.g., a French word read with an English voice).
- Cognitive Disabilities: Mismatch between expected language and how content is read or displayed can cause confusion, increase cognitive load, or hinder comprehension.
To address inappropriate or missing lang attributes:
- Locate the HTML element missing or with an inappropriate language attribute.
- If missing, add a
langattribute to HTML elements that contain text in a language different from the document’s default. - Make sure the tag uses a valid language code.