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
Why it matters
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 Lumtera flags
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 to 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 to check your fix
- Update the post. The issue disappears from the 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 Accessibility → Settings.
Start with the free plugin today
All 64 checks, the editor sidebar, Elementor panel and site report — free, with no account and no page limits.