* - Lang - Incorrect or Non-Standard Use of Language Tags

What the issue is

When the lang attribute on the <html> tag or within the document contains incorrect, outdated, or non-standard language codes, it can lead to misinterpretation of the content's language by browsers and assistive technologies. This issue arises when developers use incorrect ISO language codes, making the content inaccessible or difficult to understand for users relying on technology that adapts the content based on language settings.

Why this is important

Accurately specifying the language of the web page or parts thereof using standard codes is crucial for the correct operation of text-to-speech converters, screen readers, and other assistive technologies. It ensures content is presented in a way that matches the user's language preferences and needs.

Who it affects

This issue primarily affects:

  1. Individuals using assistive technologies that rely on language settings to provide accurate text-to-speech conversion or translation.
  2. Users who rely on voice command technologies that are sensitive to language settings.

How to remediate the issue

  1. Verify that all lang attributes throughout the webpage or application use valid and current ISO 639-1 language codes.
  2. For dialects or regional languages, ensure that the correct language and region subtag combination is used according to the IETF language tag registry.
  3. Utilize automated tools and manual checking to identify and correct any instances where non-standard or incorrect language tags are used.

Further information about correct language tagging can be found at Choosing Language Tags.

Ticket category