This technique relates to Success Criterion 3.1.1: Language of Page (Sufficient).
The objective of this technique is to identify the default language of a document
lang attribute on the
Identifying the language of the document is important for a number of reasons:
- It allows braille translation software to substitute control codes for accented characters, and insert control codes necessary to prevent erroneous creation of Grade 2 braille contractions.
- Speech synthesizers that support multiple languages will be able to orient and adapt to the pronunciation and syntax that are specific to the language of the page, speaking the text in the appropriate accent with proper pronunciation.
- Marking the language can benefit future developments in technology, for example users who are unable to translate between languages themselves will be able to use machines to translate unfamiliar languages.
- Marking the language can also assist user agents in providing definitions using a dictionary.
HTML uses the
lang attribute of the
This example defines the content of an HTML document to be in the French language.
<!DOCTYPE> <html lang="fr"> <head> <title>document écrit en français</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> </head> <body> ...document écrit en français... </body> </html>
Resources are for information purposes only, no endorsement implied.
html element of the document.
- Check that the
htmlelement has a
- Check that the value of the
langattribute conforms to BCP 47: Tags for the Identification of Languages or its successor and reflects the primary language used by the Web page.
- Checks #1 and #2 are true.