Annie Sprat from Unsplash WCAG 2.1 – Criterion 3.1.1 – Language of page (Level A)
- Przejdź do artykułów z tagiem A11Y
- Przejdź do artykułów z tagiem accessibility
- Przejdź do artykułów z tagiem accessibilityMatters
- Przejdź do artykułów z tagiem WCAG
- Przejdź do artykułów z tagiem WCAG 2.1
- Przejdź do artykułów z tagiem Web Content Accessibility Guidelines
Article content
We encourage you to familiarize yourself with the WCAG 3.1.1 Language of Page success criterion. It shows that you need to define the lang attribute at the start of the HTML document.
Example of WCAG 3.1.1 Language of Page
<HTML lang=”pl-PL”> [...] </html>
How does the WCAG 3.1.1 Language of Page criterion help navigation for websites?
It benefits users who use synthetic speech (speech generated by a computer based on text). Synthetic speech is useful for people with low vision who use screen readers. It’s good for people with dyslexia because it helps them understand the page’s content. It can also help people using screen readers, learning a new language, or foreigners. When you use the right lang attribute, they’ll know if something on the page is in a different language.
Criterion 3.1.1 is one of those few without exceptions.
Common mistakes in the lang attribute notation
When deciding to define the language, remember the correct syntax. We have encountered the lang attribute with values like “pl_PL”, which means “floor” which isn’t right.
More possibilities
When defining, for example, the English language, you can choose the accent used in a particular territory. For instance, “en-US” for the United States, “en-UK” for the United Kingdom, or “en-AU” for Australia.
If any part of the page is in a language other than the original language of the page, it should also be indicated. Yet, this relates to a different WCAG criterion, which we will discuss next week. And what about multilingual websites? We will discuss this in the context of criterion 3.1.2.
Małgorzata Szymczak
Accessibility Specialist & Junior Frontend Developer
Recommended articles
-
27.03.2024Not only designAccessibility Festival – sketch of the event
It’s hard to forget about great events on the accessibility map, that’s why we keep revisiting memories of the Accessibility…
-
12.12.2024Blind perspectiveBlind Perspective: Reflections and Resolutions
The pre-holiday hustle is in full swing. We’re wrapping up projects, searching for gifts for loved ones, and preparing the…
-
02.06.2023AccessibilityWCAG 2.1 – Criterion 1.4.2 – Sound Control (Level A)
The next WCAG criterion before us – today we’re focusing on 1.4.2 – sound playback control. The criterion is short…