-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
WCAG Level
Level A / AA
Priority
Low
Type
Structure
Pages/screens/components affected
- amp-pixel
- amp-sidebar
- amp-accordion
- amp-selector
- amp-sticky-ad
- amp-user-notification
- amp-consent
- amp-video
- amp-app-banner
- amp-youtube
- amp-base-carousel
- amp-stream-gallery
- amp-inline-gallery
- amp-lightbox-gallery
Description
It is important to programmatically identify the human language of a web page/section of a page, as this makes a difference as to how screen readers pronounce content.
We found pages that lack a programmatically defined language, which fails WCAG 2.1 SC 3.1.1 Language of the Page. This leads to the language of all parts of the content also lacking a programmatically defined language, failing WCAG 2.1 SC 3.1.2 Language of Parts as well.
User impact
Depending on the user’s setup, screen readers and other text-to-speech applications that support multiple languages will not be able to adapt to the correct accent or pronunciation when announcing page content, which can impact on the understandability of the page.
Required solution
Make sure that the human language of all HTML pages, as well as content embedded within pages and changes in language, is declared correctly. Make sure that the <html> element has the required lang attribute, and that the value of this attribute matches the human language of the page.
This solution must be applied to all instances of the issue identified within the test sample, then applied to all other instances of the same issue identified throughout the rest of the website.
Test procedure(s)
Use these steps to confirm that the solution has been correctly applied:
- Check that the
<html>element has alangattribute. - Check that the value of the
langattribute reflects the primary language used by the page.
Related standards
- WCAG 2.1 Success Criterion 3.1.1 Language of Page (Level A)
- WCAG 2.1 Success Criterion 3.1.2 Language of Parts (Level AA)
More information
- W3C - Technique H57: Using the language attribute on the HTML element
- W3C - Technique H58: Using language attributes to identify changes in the human language
Test data
Test date: November 2020