Mac OS X Reference Library Apple Developer
Search

Testing for Accessibility

Whether you’re designing a new application or access enabling an existing one, you should plan to test the accessibility of your product. Testing for accessibility is a bit different than standard user-interface testing and Apple provides a couple of tools that make the process easier.

Application developers should read this chapter to find out how to exercise the accessibility of their applications.

Using Accessibility Inspector

In Mac OS X v10.4 and later, Apple provides the Accessibility Inspector testing tool in /Developer/Applications/Utilities/Accessibility Tools. You can download the Developer Tools from the Apple Developer Connection website (developer.apple.com). Accessibility Inspector presents a utility window that displays the attributes (and values), actions, and position in the accessibility hierarchy of the object currently under the mouse pointer. To use Accessibility Inspector, be sure to enable assistive applications in the Universal Access Preferences.

If you’re beginning to access-enable your application, try using Accessibility Inspector to view the accessibility information other applications provide. Although Accessibility Inspector is not an assistive application, it uses the same APIs assistive applications use to get information from the accessibility objects it encounters.

You can focus Accessibility Inspector on a specific object to examine its attributes, perform its actions, and access its parent and children (if any), by pressing Command-F7. When you do this, the Accessibility Inspector display freezes, allowing you to move the mouse without changing the object on which the tool is focused. A second utility window then appears that displays information about the selected object. In this second window, you can go to the object’s parent, children, or other related objects, such as the containing window or the top-level accessibility object. You can also perform the actions supported by this accessibility object, allowing you to see how this affects the values of various attributes and the application itself.

As you access-enable your application, use Accessibility Inspector to make sure your objects contain the appropriate information. If you find that a specific object is not accessible, you can focus Accessibility Inspector on that object and examine its attribute values and perform its actions to find the problem.

Using Accessibility Verifier

In Mac OS X v10.4 and later, Apple provides the Accessibility Verifier tool in /Developer/Applications/Utilities/Accessibility Tools. Accessibility Verifier displays the accessibility hierarchy comprising all currently instantiated objects in the selected application. To use Accessibility Verifier, be sure to enable assistive applications in the Universal Access Preferences.

Use Accessibility Verifier to perform any or all of the following tests (select the tests you want to run by clicking the Choose Tests... button):

When you click Verify, Accessibility Verifier runs the tests you selected and displays the results for each. The problems are reported as warnings or errors, depending on their severity (you can filter the results by selecting a severity level in the Report Level pop-up menu).

It’s important to note that eliminating all errors and warnings Accessibility Verifier displays does not guarantee a perfectly accessible application. You should always test your application with various assistive applications to make sure there are no problems.




Last updated: 2008-03-11

Did this document help you? Yes It's good, but... Not helpful...