Language of Page
Summary:
WCAG 3.1.1, "Language of Page," is about making sure the primary language of a web page is programmatically determined. This is key for users who rely on screen readers or translation tools, as it ensures content is interpreted in the correct language.
What:
This guideline requires that the primary language for each web page is clearly defined and identifiable by browsers and assistive technologies.
Why:
When the language is specified, screen readers can pronounce text correctly, and automatic translation tools work more effectively. It's essential for non-native speakers and those using assistive technologies, ensuring they understand the content.
Examples and Scenarios:
- Multilingual Websites: Indicating whether a page is in English, Spanish, or another language helps users and tools navigate language changes.
- Educational Content: For educational sites with diverse audiences, correctly tagging the language ensures the content is accessible to all learners.
- E-Commerce Sites: Proper language tagging on product pages aids in accurate translation and comprehension for international customers.
How to Comply:
- Websites: Use the
lang
attribute in the HTML tag to specify the page's primary language. - Mobile Apps: Ensure that the app's development environment correctly identifies the primary language for each section or screen.
- Software Applications: Similar to websites, define the primary language for content within the application.
Exceptions:
- Single Language Content: If the content is exclusively in one language without variations, the requirement is straightforward.
- Embedded Media: Media elements like videos or audio clips in a different language within the content might not be covered by this criterion.
- User-Generated Content: Content dynamically generated by users may not always have the correct language tagging.