|Elements with text content in a different language from the principal language of the page must use the
lang attribute with a valid IANA language code to identify the change.
- Assistive technologies like screen readers and other speech output technologies need to know the language of the characters of an element to speak the text content correctly.
HTML4 Legacy Techniques
HTML5 and ARIA Techniques
|WCAG Success Criteria
3.1.2 Language of Parts (Level AA, Primary Success Criterion)
Elements with text content that is in a different language than the principal language of the page
- Use the
lang attribute to define the IANA language of the text content of the element.
- Use the IANA codes to identify the language of the text in the element (e.g. en, fr, ...).
- Review the page for any text content in languages that are different than the principal language of the page.
- If any changes in language are found, use the
lang attribute to identify them.