- Success Criterion 3.1.2
- Conformance level AA
Language Attribute Copy-Pasted Onto the Wrong Piece of Text
3.1.2 — Language of Parts
Scenario
Setting
A survey tool's question builder
What’s wrong
Wrong part-level lang values inherited from copy-paste.
Example
<div class="question" lang="fr">
<label>What is your favorite color?</label>
<input type="text">
</div> Why it matters
This English question was pasted from a French template and kept lang="fr", so a screen reader applies French pronunciation to plain English text, confusing respondents mid-survey.
How to test
Inspect a lang attribute that appears to be copy-pasted or inherited incorrectly at the part level: verify it matches the actual language of that specific text.
How to fix
Audit lang attributes whenever question content is duplicated or copy-pasted between templates in different languages.
<div class="question" lang="en">
<label>What is your favorite color?</label>
<input type="text">
</div> Outcome
A respondent hears the question read in natural English and answers without hesitation.
Who is affected
Screen reader users answering the survey hear their own language mispronounced because of a leftover attribute unrelated to the actual text.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- No Way to Programmatically Tell Which Language a Passage Uses
- Foreign-Language Quote or Phrase With No Language Attribute
- Language Switcher Link With No Language Tag of Its Own
- Mixed-Language Legal or Product Text Left Entirely Unmarked
- Bilingual Layout Where One Column’s Language Goes Unmarked
- User-Generated Content in Another Language Never Tagged