Testing Java for Accessibility
Sun has done an excellent job with providing
developers resources for accessibility, including several free tools and
utilities. Though there are several tools, one of the most useful is the
Java
Accessibility Helper
.
Note: The download is free but requires a login to the Sun website.
The accessibility helper is a tool that has the ability
to pinpoint potential barriers for users with disabilities by running
the .class file in question, querying each component for accessibility
issues, then generating a log. It can be run on both applets and applications.
After downloading (and uncompressing) the Accessibility
Helper, it can usually be started by double-clicking the icon. You will
need to have the Java Development Kit on your machine if you do not already.
If the application does not start, consult the documentation that comes
bundled with the software.
To test with the Java
Accessibility Helper:
- Under the 'File' menu, select 'New Test Set' menu item
(see Image
8).
- A "Test Set Properties Window" should appear asking which
applet or application you would like to run.
- Choose a .class file. You also have the option of passing any command
line parameters (see Image
9).
- Once the class has been loaded, select the left-most icon in the toolbar,
or from the 'Test Set' menu by selecting 'Execute' (see Image
10).
Note: Testing will
begin after thirty seconds of idle time, so make sure that while the applet
is being tested, you do not move the mouse or type on the keyboard; this
may skew the results.
- Once the applet has been tested, a report will be generated.
The output log is similar to compiling, where the shorter the report generated,
the better. If no errors are found, it will generate an empty report,
printing "Java Accessibility Helper Report" to the output text area. If
errors are found, however, the report contains which errors were found,
as well as links to descriptions of errors (see Image
11).
Note: One common error is failing to give an accessible description to the applet or application
itself.
It is always a good idea to have an individual
with a disability actually test your applet; this can often point out
design flaws and provide advice from a different perspective. You could
also try unplugging your mouse to test keyboard access, or install a screen
reader such as JAWS. Or you could turn off you monitor, and see how well
you can navigate your program.
Note: A
trial version
of JAWS
can be
downloaded for free and allows for testing in forty-five minute blocks (before needing to
restart your machine).
Finally, you may want to download
the Java Accessibility Utilities
,
which are a series of classes and interfaces designed to make programming
for accessibility easier. The utilities package also contains sample applications
which demonstrate the use of the utilities package.
General Java Design Guidelines
While providing accessible names and descriptions for
graphical components is an important step for opening up your applet,
do not underestimate the power of design. Good applications work for all
users, and contain common layout and behavior. Below is a list that, while
not complete, provides some general accessibility considerations.
- If using sound, make sure you test with a screen reader. The sounds
may potentially blend together, becoming indistinguishable.
- Appropriate layout of components is important. Several small buttons
located in a small area can present problems for individuals with motor
skill disabilities.
- Be careful with your use of color. Many individuals are color-blind,
so do not rely on color alone to convey information.
- Use fonts that are easily readable.
- Provide textual equivalents for all non-text elements, and avoid using
graphics that convey no information.
- Where appropriate, use the most straight-forward language possible.
- Avoid blinking or moving text.
The next page will present additional
resources on accessible Scripts and Java.