跳至主要內容
What's New

8.24 WCAG 2.2 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 Traditional 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.2 Reference:

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