Web checklist

Checkpoint AA3.1.2: *WCAG 2.0 AA* 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.


Rationale

This checkpoint is used to identify changes in language on a Web page by using the (X)HTML lang attribute. Checkpoint 3.1a requires the use of the lang attribute on the <html> element to identify the primary language of the page. Checkpoint AA3.1.2 requires the use of the lang 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.

Required development and unit test techniques


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).

  1. Identify language change: Use the lang attribute 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.

HTML examples

  1. Identify language change: Use the lang attribute to identify changes in the human language.

    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.

    <html lang="en">
    <p lang="de">
    Guten Morgen
    </p>
    </html>

    Required unit tests for HTML technique 1


Recommended development techniques

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.