What WCAG 3.1.2 Requires
When a passage is in a different language than the rest of the page, that passage needs its own lang attribute, so assistive technology can switch pronunciation for it.
Can AccessBell Test This Automatically?
Yes. AccessBell's scanner runs axe-core, which includes 1 rule that catch code-level failures of this criterion:
valid-lang— Ensure lang attributes have valid values (details (opens in a new tab))
This criterion is included in: WCAG 2.2 AA Checker, WCAG 2.1 AA Checker, ADA Compliance Checker, Section 508 Checker, EN 301 549 Checker.
How to Test It by Hand
Find any foreign-language phrases or quotes and check whether they are wrapped in an element with the correct lang attribute.
Common Failures
- A quoted phrase in another language has no lang attribute marking the change.
Example Fix
- Declare the page language. Add a lang attribute to the html element so screen readers use the right pronunciation.
- Mark language changes. Wrap phrases in another language with their own lang attribute.
<!doctype html>
<html lang="en">
<head>...</head>
<body>
<p>Our motto is <span lang="fr">savoir-faire</span>.</p>
</body>
</html> Related Criteria in Readable
WCAG 3.1.2 Questions
What does WCAG 3.1.2 require?
When a passage is in a different language than the rest of the page, that passage needs its own lang attribute, so assistive technology can switch pronunciation for it.
Can AccessBell test WCAG 3.1.2 automatically?
Yes. AccessBell runs 1 automated rule that can catch failures of this criterion, including in our WCAG 2.2 AA Checker, WCAG 2.1 AA Checker, ADA Compliance Checker, Section 508 Checker, EN 301 549 Checker.
What level is WCAG 3.1.2?
Level AA, added in WCAG 2.0. Level AA is required to meet WCAG AA, the level referenced by the ADA, Section 508 and most accessibility laws.
Sources
- W3C: Understanding 3.1.2 Language of Parts (opens in a new tab)
- W3C: Web Content Accessibility Guidelines (WCAG) 2.2 (opens in a new tab)
This page explains a technical standard and is not legal advice. See our disclaimer.