The Accessibility Package
Now, let’s discuss the issues an assistive technology will encounter when hooking into an accessible friendly application.
The Path to Determining Accessibility
Almost all Swing objects support one or more forms of accessibility,
which means they implement the
interface. However, for an assistive technology to find out which
types of accessibility an application supports, the technology needs
to do some investigating. The typical course of action goes like
The assistive technology locates a desired component in the target application with the help of the Accessibility Utility APIs. Once found, it invokes the
getAccessibleContext()method of the component object, which is the sole method of the
Accessibleinterface. This method returns a customized
AccessibleContextobject, often an inner class of the component.
The assistive technology can then use the
AccessibleContextobject to retrieve the name, description, role, state, parent, and children components of the accessible component in question.
The assistive technology can register for any property change events in the component that it’s interested in.
The assistive technology can call upon six standardized methods to determine whether those types of accessibility are supported. All
AccessibleContextobjects have these interface methods. If any of these methods return
null, then the component does not support the specific accessibility type.
If they are not
null, the objects returned by each ...