Spark Design System
Accessibility
Default language
Use a <lang> attribute on the <html> element of each web page.
Why it matters
This helps screen readers load the correct pronunciation rules, visual browsers display characters and scripts correctly, and media players show captions correctly. As a result, users with disabilities will be better able to understand the content. When a web page uses several languages, the default text-processing language is the language which is used most. If several languages are used equally, the first language used should be chosen as the default human language.
WCAG 2.0 reference: 3.1.1 Language of Page
Example
<html lang="en">
How to check for this
- Examine the element of the document. Automated
- Check that the element has a lang and/or xml:lang attribute. Automated
- Check that the value of the lang attribute conforms to BCP 47: Tags for the Identification of Languages or its successor and reflects the primary language used by the Web page. Manual