How Accessibility Works

Assistive technologies are a feature of Java. These technologies typically manifest themselves as a class archive, such as a JAR file, that resides separately on the user’s local machine. As we mentioned earlier, however, Java offers assistive technologies a wide latitude of control over an application for two reasons:

  • Java loads assistive technologies into the same virtual machine as the application (or applications) with which they intend to interface.

  • Assistive technologies can use or even replace the virtual machine’s sole windowing event queue (java.awt.EventQueue).

Let’s take a look at an accessibility-enabled Java virtual machine (JVM). When a JVM is started, it searches a configuration file for a list of specialized classes (we’ll provide specifics about this later in this chapter). If it finds them, it loads the classes into the same namespace as the application that it is about to execute. Thus, when the Java application starts, the assistive technologies start with it.

The second important step is replacing the GUI event queue with an appropriate queue for the assistive technology. Hence, the application, GUI event queue, and assistive technology work together to make accessibility possible. Figure 25-1 shows how an assistive technology interfaces with the JVM.

An assistive technology in the JVM

Figure 25-1. An assistive technology in the JVM

Evolving Accessibility Support

Before we get ...

Get Java Swing, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.