WCAG 3.1.2 Language of Parts
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.
Table of contents
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.
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.
Testing WCAG 3.1.2 With AccessBell
AccessBell's scanner runs axe-core, which includes 1 rule that catch code-level failures of this criterion. Automated checks help you spot issues quickly; a person still needs to review what they cannot judge.
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.
Run a free scan to spot issues on your own pages.
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
- 3.1.1 Language of Page (Level A, WCAG 2.0)
- 3.1.3 Unusual Words (Level AAA, WCAG 2.0)
- 3.1.4 Abbreviations (Level AAA, WCAG 2.0)
- 3.1.5 Reading Level (Level AAA, WCAG 2.0)
- 3.1.6 Pronunciation (Level AAA, WCAG 2.0)
Frequently Asked 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. A person still needs to check what automation cannot judge.
What level is WCAG 3.1.2?
Level AA, added in WCAG 2.0. Level AA is 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.