Language Attribute Check

RuleSets of AccessMonitor - the validator of web accessibility practices

Language Attribute Check

Description

The “Language Attribute Check” evaluates whether all HTML elements using the lang attribute declare a valid BCP 47 language tag.

Example outcome

I noticed that all elements with a lang attribute use a valid language tag.

Impact

Fixes

To address inappropriate or missing lang attributes:

  1. Locate the HTML element missing or with an inappropriate language attribute.
  2. If missing, add a lang attribute to HTML elements that contain text in a language different from the document’s default.
  3. Make sure the tag uses a valid language code.

Resources