Default Language and Language Change
Indicating the language of the content in markup is critical for screen readers and other speech renderings of web resources. These technologies need information about the language so that they can use the appropriate pronunciation standard to render the web resource.
Many speech synthesizers support multiple languages. Marking up the language of the content is especially critical when more than one language is used within a web page; without proper specification, speech renderings could become confusing and unintelligible, similar to the visual confusion that occurs when a character set is not available and apparently random characters appear on the screen.
Benefits to People with Disabilities
- Screen readers can select the correct pronunciation standard and deliver the content intelligibly.
Benefits to Everyone
- Users receive better search results of web resources since search engines will know what language web resources are in.
Benefits to Developers
- The ranking of web resources improves when search engines know what language web resources are in.
- Internationalization Best Practices: Specifying Language in XHTML and HTML Content
- W3C WCAG 1.0 language techniques
- Language Value Registry
- If an xhtml DOCTYPE is used the for the page, the xml:lang attribute should be defined to specify the default language, although at this point in time assistive technology does not use this information to change the voice synthesis language.
- Two-character character codes from a language value registry are used as the value of xml:lang attribute.
- The default language must be defined using the
langattribute on the html element.
- The lang attribute can be used on almost all html elements to define the intended language of the text content of the element, and is used by assistive technologies to change the voice synthesis language.
- Two-character character codes from a language value registry are used as the value of
Related Accessibility Requirements
Illinois Information Technology Accessibility Standards
Web Content Accessibility Guidelines (WCAG) 2.0
- 3.1.1 Language of Page: The default human language of each Web page can be programmatically determined.
- 3.1.2 Language of Parts: The human language of each passage or phrase in the content can be programmatically determined except for proper names, technical terms, words of indeterminate language, and words or phrases that have become part of the vernacular of the immediately surrounding text.