Skip to main content

Web checklist

Checkpoint 3.1a: *WCAG 2.0* Language of page

The default human language of each Web page can be programmatically determined.

On this page:



Rationale

It is important to identify the primary language of the web page so assistive technology can correctly read the content. The lang attribute of the html element allows you to specify the language.

Required development techniques

Compliance with this checkpoint requires at least one of the following techniques be met.

This technique is defined in the Level A Success Criterion for item 3.1.1 from the WCAG 2.0 checklist (link resides outside of ibm.com).

  1. Primary natural language: Identify primary natural language(s) using the lang attribute of the HTML element.

Examples for HTML developers

1. Primary natural language: Identifying primary natural language(s) using the lang attribute of the HTML element.

Example 1

Using the lang attribute to identify the language of the page, helps ensure that assistive technologies like Braille software and screen readers will correctly pronounce the text. In the example below, the lang attribute is used to identify the page is in English. If the page is authored in a left-to-right language, only the lang attribute is required. For XHTML, use the xml:lang attribute.

<html lang="en" xml:lang="en">

For more examples of this technique, refer to WCAG 2.0 examples for identifying primary natural language(s) using the lang attribute of the html element (link resides outside of ibm.com).


Examples for Domino developers

For techniques where there are no specific examples for your technology, please use the HTML examples as a guide for how to implement a particular technique

1. Primary natural language: Identify primary natural language(s) using the lang attribute of the HTML element.

To comply with this technique, at least one of the following examples must be implemented.

You can use the lang attribute to specify the language on the page using Domino 7.02 or later.

Example 2

On the form, create a new field with the following properties:

When you display the form in Domino, look at the source. The lang attribute is now added to the HTML element.

Implementation of recommended techniques is not required to comply with this checkpoint, but these techniques should be reviewed since they can improve the accessibility and usability of the solution.

Examples for recommended techniques:

1. Use the dir attribute: Identifying the primary text direction using the dir attribute of the HTML element.

Example 3

The following example illustrates the use of both the lang attribute and the dir attribute when the page is authored in a right-to-left language such as Hebrew or Arabic.

<html lang="he" xml:lang="he" dir="rtl" >

See WCAG 2.0 Additional Techniques (Advisory) for 3.1.1 (link resides outside of ibm.com) for a further list of techniques and examples.

Required test techniques

The following test tools and techniques are required to test this checkpoint.

  1. Test tools
  2. Required accessibility verification test techniques

Test tools:

Install the following tools to test this checkpoint:

Required accessibility verification test techniques:

Use the following accessibility verification test (AVT) techniques to validate the Web content. It is recommended that these tests be performed in order.

1. Web syntax analyzer test:
Action Result

Test the Web site with a Web syntax analyzer to verify the compliance criteria as follows.:

Pass:

Fail:

©2009 IBM Corporation

Last updated September 1, 2009

W3C Recommendation 11 December 2008: http://www.w3.org/TR/WCAG20/ (link resides outside of ibm.com)
Consortium for Informatics and Mathematics, Keio University), All Rights Reserved.