Inline language changes use invalid codes
Automated check valid-lang, run with axe-core
- WCAG
- 3.1.2 Language of Parts (Level AA)
- Severity
- Moderate: a degraded experience
- Typical effort
- Quick win, under 1 hour
- Category
- Page structure
Who this affects
Screen reader users reading mixed-language pages.
Why it matters
Quotes or terms in another language are read with the wrong pronunciation rules.
How to fix it
Use a valid lang attribute on the element wrapping the foreign-language text.
Check your own website
The free scan tests 3 pages against WCAG 2.2 A and AA in about 30 seconds. No sign-up.