Correct language codes for different languages on the page has been set where applicable

Design Notes

Design decisions are not relevant.

Developer Notes

Setting language codes

As well as setting the language of the page it is also important to set the language code on parts of text. If your pages contain multiple languages, use the lang attribute with the relevant language code to identify changes in the language.

For example <p lang="fr">Ceci est écrit en français</p>

This will help user agents and assistive technologies to present content according to the presentation and pronunciation rules of that language.

More information

Testing Notes

Correct language codes for different languages on the page has been set where applicable

The human language of each passage or phrase in the content can be programmatically determined.

Exceptions include: proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text.

Steps to check

  • Identify any content written in a different language and use Developer Tools to inspect and confirm content has been marked up appropriately

For example, where the main site language is English and a fragment is written in French the code should look something like this using a code inspector:

<p lang="fr">Ceci est écrit en français</p>

Impact range: Low

Test type: Manual

WCAG Reference: Understanding Success Criterion 3.1.2 Language of Parts