Techniques for WCAG 2.0

Skip to Content (Press Enter)

-

H89: Using the title attribute to provide context-sensitive help

Important Information about Techniques

See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.0 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.0.

Applicability

HTML and XHTML

This technique relates to:

User Agent and Assistive Technology Support Notes

See User Agent Support Notes for H89.

Description

The objective of this technique is to provide context sensitive help for users as they enter data in forms by providing the help information in a title attribute. The help may include format information or examples of input.

Note: Current user agents and assistive technologies do not always provide the information contained in the title attribute to users. Avoid using this technique in isolation until the title attribute has wide-spread support.

Examples

Example 1

A mapping application provides a form consisting of a label "Address:", an input box and a submit button with value "Find map". The input box has a title attribute value with an example of the address format the user should enter.

Example Code:


<label for="searchAddress">Address: </label>
<input id="searchAddress" type="text" size="30" value="" name="searchAddress" 
 title="Address example: 101 Collins St, Melbourne, Australia" />
             

Example 2

A form that allows users to pay their bill online requires the user to enter their account number. The input box associated with the "Account number" label has a title attribute providing information on locating the account number.

Example Code:


<label for="accNum1">Account number: </label>
<input id="accNum1" type="text" size="10" value="" title="Your account number 
 can be found in the top right-hand corner of your bill." />
             

Tests

Procedure

  1. Identify form controls that require text input.

  2. Check that each form control has an explicitly associated label

  3. Check that each form control has context-sensitive help provided in the title attribute.

Expected Results

If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.