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.
Piotr Źrołka
Accessibility expert & CEO
Recommended articles
-
17.04.2023AccessibilityWCAG 2.1 – Criterion 1.3.2 – Meaningful Sequence (Level A)
Since it’s Friday, the WCAG Academy is sending another dose of knowledge Firstly, it’s important to note that WCAG Criterion…
-
08.11.2024AccessibilityFrom Theory to Practice: How to Promote Accessibility Awareness Within an Organization?
Accessibility is a process – we repeat this phrase at Kinaole like a mantra, whenever and wherever possible. Accessibility audits,…
-
19.09.2024AccessibilityHow to audit and create a report on digital accessibility. Part two
In the first article of this series, we discussed why it’s important to verify the state of digital accessibility. We…