language-attribute-mismatch

The “lang” attribute of the page and its parts must match the language of the content.

Who might be affected
Screen Reader

Description

Screen readers (and some other assistive technologies) depend on the lang attribute to determine which language package they should use and how to pronounce the texts. When the lang attribute does not match the page's or element's language, screen readers will mispronounce the text, making it difficult for users to understand the spoken content or even not understand it at all.

Quick Fixes

Ensure that the value of the lang attribute on the html or any other element on the page is matching the language of text within it.

1
2<html lang="en">
3 <!-- El contenido de la pagina esta en español -->
4</html>
1
2<html lang="es">
3 <!-- El contenido de la pagina esta en español -->
4</html>

You can find here a table of valid lang attribute values:
ISO 639-1 language codes

How Users Are Affected

Users of assistive technologies that read out the content may have difficulty or not understand the spoken content due to mispronunciation.

WCAG Success criteria

This issue might cause elements to fail one or more of the following Success criteria:
3.1.1 Language of Page (A) | 3.1.2 Language of Parts (AA)