axe-core rule: valid-lang

An element declares an invalid language code

What it is

An element inside the page has a lang attribute with an invalid value, so screen readers cannot switch pronunciation for that passage.

Who it blocks

Screen reader users reading multilingual content.

How to fix it

Use valid BCP 47 language tags on any element that changes language mid-page.

Example fix

<!-- Before -->
<blockquote lang="spanish">La vida es sueno.</blockquote>

<!-- After -->
<blockquote lang="es">La vida es sueno.</blockquote>

This is one of the barrier types BarrierScan checks for on every scan. Request a free accessibility scan to see whether it appears on your site, alongside the rest of the automated findings.