Language
Language code is invalid
WCAG 2.2 success criterion 3.1.2 Language of Parts (Level AA)
- WCAG 2.2
- 3.1.2 Language of Parts
- Level
- AA
- Default severity
- Needs review
- Available in
- Free
Updated for Lumtera 1.2.2 and Lumtera Pro 1.1.1.
Why does it matter?
Screen readers switch voice and pronunciation based on lang attributes. A malformed value means the passage is read with the wrong voice.
Who it affects: Screen reader users, whose software chooses a voice and pronunciation from the language, and people using translation tools.
What does Lumtera flag?
lang attributes inside the content that are not valid language codes.
Check ID lang-invalid — use it to filter the content report or with wp lumtera issues --rule.
How do I fix it in WordPress?
Use a standard language code such as lang="fr", lang="es-MX" or lang="zh-Hant". In the editor, select the text and use the Language format in the toolbar.
Example
<p lang="french">Bonjour et bienvenue.</p>
<p lang="fr">Bonjour et bienvenue.</p>
How do I check the fix?
- Update the post. The issue disappears from the Lumtera Accessibility sidebar on the next check, and from the site report on the next scan.
- Listen to the passage with a screen reader. It should be read with the correct language's pronunciation.
Find this issue across your whole site
Lumtera runs this check in the block editor sidebar as you write, in the Elementor panel, in Review mode on the live page, and across the whole site in the content report and with wp lumtera scan. You can change its severity or turn it off in Lumtera → Settings.
Start with the free plugin today
All 69 content checks and 33 whole-page checks, fixes you approve with undo, and the site report — free, with no account and no page limits.