Introduction to the Accessibility API

The Accessibility API enables you to develop accessible BlackBerry® device applications that provide information to assistive technology applications such as screen readers. Screen readers and other assistive technologies can make it easier for people with disabilities or impairments to use your accessible application. Standard UI components, such as TextField, automatically provide information to assistive technology applications. If you use custom UI components (components that extend the standard UI components), you must use the Accessibility API to provide information to assistive technology applications.

For all the custom UI components in your accessible application, you must implement the net.rim.device.api.ui.accessibility.AccessibleContext interface. The methods in this interface identify the information that you want to send to an assistive technology application. For example, in a custom UI component that implements AccessibleContext, getAccessibleRole() returns the control's role, such as AccessibleRole.TEXT_FIELD. If your application contains custom text fields, custom numeric fields, or custom tables, you can also use the AccessibleText, AccessibleValue, or AccessibleTable interfaces.

An assistive technology application registers as an accessibility event listener. When an accessibility event occurs on a custom UI component, the accessible application invokes the accessibleEventOccurred() method in the registered assistive technology application and passes in the event information. The assistive technology application handles the event and performs the appropriate action, such as speaking the text or playing a sound.

The following diagram shows the relationship between an accessible application and an assistive technology application. The AccessibilityDemo sample application that is provided with BlackBerry® Java® Development Environment and BlackBerry® Java® Plug-in for Eclipse® 4.6.1 and later is structured this way.


Was this information helpful? Send us your comments.