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
-
31.10.2024Blind perspective
Blind Perspective: I Don’t Buy with My Eyes
In today’s article, I want to revisit the topic of online shopping. This subject has come up before in this…
-
04.05.2023Accessibility
WCAG 2.1 – Criterion 1.3.4 – Orientation (Level AA)
Today, we present to you WCAG criterion 1.3.4 (Level AA) regarding orientation. In simplest terms, content and functions cannot be…
-
26.07.2024Accessibility
WCAG 2.1 – Criterion 3.3.4 – Error prevention (Legal, Financial, Data)(Level AA)
Have you ever made a mistake that could have cost you not only a lot of nerves but also hard-earned…