About this tutorial
An accessible Java graphical user interface (GUI) is one that has been developed to allow users with disabilities to use and interact with the GUI. With the aid of assistive technologies, such as screen magnifiers and screen readers, and the use of the keyboard, disabled users can have access to the same functionality as any other user.
The key criteria to consider when creating an accessible GUI are:
-
Working with screen readers: Some visually impaired users will need to rely completely on a screen reader to navigate and interact with a GUI.
-
Keyboard navigation: When using a screen reader, users will also need to navigate the GUI using the keyboard, because without knowledge of the mouse pointer's location they will not be able to use the mouse. Other users require keyboard navigation if they have problems manipulating a mouse.
-
Visual focus: Sighted users who have to navigate the GUI using the keyboard because they cannot manipulate a mouse, need visual indication of the focus. If they do not know where the focus is, they will have no idea how to keyboard navigate to their desired destination.
- Supporting high contrast settings: Some visually impaired users need to magnify the font and increase the contrast of their display. An accessible GUI should reflect these changes.
With Java GUIs there are certain trouble spots where it becomes difficult to satisfy the above criteria. In this tutorial, we present a range of techniques to overcome some of these problems. In addition, we provide working code at j-accessgui.zip so you can compile and test the techniques for yourself.
If you are a Java developer who wants to write accessible Java GUIs, then this tutorial is for you. However, this tutorial is not designed to be an introduction to writing accessible Java GUIs; rather, it serves as a guide on how to handle problem areas. Therefore, this tutorial is for the Java developer who:
- Has already written accessible Java GUIs and would like to know how to overcome some of the common problem areas
- Is learning how to write accessible Java GUIs and would like to know some of the problem areas to avoid
Prior to taking this tutorial, you should have a solid understanding of coding in the Java language and a basic understanding of how to make a Java GUI accessible. Barry Feigenbaum's recent article on developerWorks, "Coding for accessibility" (see Resources), provides a good introduction to this topic.
To complete the examples in this tutorial, you will need J2SE version 1.3.1 or higher. The examples will work with versions 1.3.1, 1.4.0, or 1.4.1, unless stated otherwise. In these cases, functionality introduced in a new version has been exploited in the example code. You can download the sample code, j-accessgui.zip.
For the section Developing for screen readers , you will need a screen reader or other assistive technology that enables access to the accessible information provided by the Java GUI (see Resources).

