Search Menu
Language Menu
Mobile Menu
OGCIO

8.20 WCAG 2.1 Success Criterion 3.1.1 − Language of Page

Ensure the primary language of a webpage is defined within the HTML code. The correct speaking language will be loaded by screen readers to read the words in the webpage.

A webpage sample in Chinese.

The example above is written in Chinese. When using screen readers, it is important for the tool to know the language of the webpage.

Before Rectification

A code snippet showing a plain HTML tag.

After Rectification

The same code snippet with the xml:lang attribute added.

In order for the screen reader to work correctly, the above language specification must be included in the HTML code.

WCAG 2.1 Reference:

https://www.w3.org/WAI/WCAG21/Understanding/language-of-page