Web Development
Web Developer Guidelines
Visual Design Recommendations

Checkpoint 1.13 - Java

All elements and functions of a form can be accessed with assistive technologies

WCAG 1.0 Priority 2

WCAG Guideline 12. Provide context and orientation information.

Forms are used to gather information from users and are a common component of applications. Assistive technology access to form components requires proper coding of the form controls.

Requirement

All elements and functions of a form can be accessed with assistive technologies

Recommendation

Associate labels with controls, objects, icons and images and provide a visual focus indicator that moves among interactive objects as the input focus changes. The focus must be programmatically exposed to assistive technology.

Label the object with an instance of JLabel and use setLabelFor() to set the correct properties in the AccessibleContexts. When using setLabelFor(), the component that is labelled (e.g. a JTextField) will get the AccessibleName and AccessibleDescription of the JLabel.

Checking Tool

Test with a screen reader and verify all information on the form is spoken. Navigate to each input field using the keyboard with the screen reader to read:

  • Text labels
  • Object type (role) (e.g. radio button, checkbox, edit field)
  • Object status if appropriate (e.g. a radio button or checkbox that is checked)
  • Object contents (e.g. default text, combobox content)

Tab or arrow to objects and controls on the screen. The screen reader will read the Label. Verify that the screen reader reads the label and name of the object with focus.

Information Source

The original source of this information is located on the W3C web site  (www.w3.org/TR/WCAG10-TECHS/#tech-group-information)

 

Back to top