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.
This checkpoint is used to identify changes in language on a Web page by using the (X)HTML
attribute. Checkpoint 3.1a requires the use of the lang attribute on the
element to identify the primary language of the page. Checkpoint AA3.1.2 requires the use of the
attribute on an element containing a phrase in a language that is different than the primary language of the page.
When no other language has been specified for a phrase or passage of text, its human language is the default human language of the Web page (see Checkpoint 3.1a). So the human language of all content in single language documents can be programmatically determined.
To comply with this checkpoint, you must meet the following technique. This technique is defined in the WCAG 2.0 Level AA Success Criterion 3.1.2 (link resides outside of ibm.com).
- Identify language change: Use the
langattribute to identify changes in the human language.
Note: The examples presented in the techniques are not exhaustive. They are meant to illustrate the spirit of this checkpoint.
To comply with this technique, you must implement the following example.
HTML Example 1
The following example indicates that English is the primary language of the page. In addition, the page contains an embedded German phrase that is identified with a
lang="de"attribute in the paragraph element.
Required unit tests for HTML technique 1
Although you are not required to implement the recommended techniques in order to comply with this checkpoint, you should review these techniques because they can improve the accessibility and usability of the application. Refer to the WCAG 2.0 Additional Techniques (Advisory) for Success Criterion 3.1.2 (link resides outside of ibm.com) for a list of techniques and examples.
©2013 IBM Corporation
Last updated January 1, 2013.
W3C Recommendation 11 December 2008: http://www.w3.org/TR/WCAG20/ (link resides outside of ibm.com)
Copyright 1994-2009 W3C (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University), All Rights Reserved.