36. Language declaration is invalid

3.1.2

Language declaration incorrect example

Description: The value for the language attribute is not set to a valid language code. Valid language codes must be used to programmatically determine the human language of pages and parts of content.

Context: The language attribute has a strict set of valid values that it allows, any invalid values are ignored. Verify if these tags are necessary for your content as well.

<span lang="ES-TRAD">
    <span class="il" style="transition: none 0s ease 0s;">Nathalie</span>
    <span class="il" style="transition: none 0s ease 0s;">Ginapp</span>
</span>

How to fix it: Make sure you are using a valid BCP 47 language code for the language attribute.

<span lang="es">
    <span class="il" style="transition: none 0s ease 0s;">Nathalie</span>
    <span class="il" style="transition: none 0s ease 0s;">Ginapp</span>
</span>

Techniques: H58