Set the name on all components and include a description on icons and graphics. If an image is used to identify programmatic elements, the meaning of the image must be consistent throughout the application.
Rationale
Persons who are blind or who have low vision are unable to understand what a graphic represents. People with learning disabilities may have difficulty comprehending the meaning of a graphic.
The intent of the checkpoint is to describe the purpose or role of visual components in an application. In many cases, the role of a component is a sufficient description for standard components. However, graphics and icons need to implement AccessibleDescription to give the user sufficient information to understand the purpose of the graphic or icon. Generally speaking, a description is needed anywhere that you would want a tooltip.
Development techniques
The following techniques are the minimum required to meet Checkpoint 2.3 from the IBM Java Accessibility Checklist:
- Implement the AccessibleName method on all objects. See IBM Guidelines for Writing Accessible Applications Using 100% Pure Java section 6.2.1.1 AccessibleName.
- If the object is a graphic, in addition to AccessibleName implement the AccessibleDescription method. See IBM Guidelines for Writing Accessible Applications Using 100% Pure Java section 6.2.1.2 AccessibleDescription.
- When bitmap images are used to identify controls, status indicators or other programmatic elements, the meaning assigned to those images must be consistent throughout an application. See the following samples which illlustrate some of these techniques.
The techniques above are required; the following techniques are recommended to enhance accessibility:
- If the graphic is an icon and used to add significance to another object such as a label, implement the AccessibleIcon method. See IBM Guidelines for Writing Accessible Applications Using 100% Pure Java section 6.2.9 AccessibleIcon. Note: This feature is only supported in Java SDK 1.3 or later.
- Avoid having multiple objects with the same name on the same form or dialog if they do not perform the same function.
- Logically group components and assign that grouping a name to facilitate navigation of your application.
- When GUI components have a logical association, group them, and assign the grouping a name. To identify a logical group , in JFC, you can add components to JPanels and set the AccessibleName on the JPanel. Another technique to do this is to create a JPanel with a JFC TitledBorder. There is no reason to set the AccessibleName because the JFC will set the name to the title text.
Testing techniques
Test the software to ensure that it complies with accessibility requirements.
Tools
You will need to install one of the following tools to test this checkpoint:
- A screen reader that supports Java, and the Java Access Bridge
- One of the Java testing tools such as JavaFerret from Sun.
Windows techniques
| Action | Result | |
|---|---|---|
| 1 | Test with the screen reader to verify controls and objects are read.
|
Pass: The screen reader reads the name of the object. For example, the text on a button or text associated with a image. button. Fail:
|
| 2 | Not required if Step 1 test passed. Test with JavaFerret to display the AccessibleName and AccessibleDescription for each object. This test is not required if the screen reader read the information correctly in the first test.
|
Pass: JavaFerret displays valid values for the Name and Description properties. ![]()
Fail: JavaFerret displays "null" for the Name and / or Description properties.
|
©2001, 2008 IBM Corporation
Last updated February 15, 2008.

