JavaSoft - Sun MicroSystems
JAVA ACCESSIBILITY
Overview of the
Java Accessibility Features
Version 0.5
08 October 1997

[Home] [What is it?] [Overview of Features] [API Reference]
[FAQ] [Tutorial] [Tools] [Changes] [JFC Home Page]

Introduction

Java Accessibility provides the technology that allows assistive technologies to obtain accessible information about the user interface objects in the Java Virtual Machine. Java Accessibility supports JDK 1.1 and up and is provided in three ways:

  1. The accessible design of the Java Foundation Classes include the ability to "plug in" an alternative look and feel for an application without requiring changes to be made in the application. More information on this design can be found in the Preliminary Specification for Swing.
  2. An independent Java Accessibility API toolkit that provides "boiler plate" interfaces for UI components. Included are interface Accessible and interface AccessibleText. Prior versions of this Early Access Release of Java Accessibility included these interfaces. As of this release they are now located with the Swing classes. More information about them can be found in the Preliminary Specification for Swing with the javadoc-generated documentation for the com.sun.java.accessibility package.
  3. Utilities that support assistive technologies. The utilities included with this release are as follows:
Explanation of Core API Interfaces and Classes 
Interface Accessible
Interface Accessible is the main interface in Java Accessibility. It contains multiple methods from the awt.component ( getForegroundColor etc.) along with new methods (getAccesibleName, getAccessibleRole, etc.). Sun feels this interface should be implemented on every applications UI component, so that the application will be "compatible" with Assistive technologies.
Interface AccessibleText
Interface AccessibleText is the rich text portion of the Java Accessibility interface. It contains new methods for querying and manipulating text (getIndexAtPoint, getAtIndex, getAfterIndex, getCharacterAttribute, etc.). The multiple methods in this interface have no parallel in AAJ. Without this interface text rendered with Java2D would be completely inaccessible when Java2D bypass's the screen readers' Off-Screen-Model. Sun feels this interface should be implemented on every applications UI component, so that the application will be "compatible" with Assistive technologies.
Interface AccessibleLayout
Interface AccessibleLayout is a standard way for assistive technologies,or any other interested product, to navigate through UI components which contain other UI "Containers". These "containers" may be instances of a java.awt.Container, or they may simply be instances of "*.accessibility.Accessible". The idea here is to provide a standard contract for navigating through components in the UI. Sun will provide a default implementation of this interface. It simply defines the contract for doing the query. As long as an application uses either java.awt.container or *.accessibility.Accessible to hold UI components, they will can be navigated via the interface AccessibleLayout, and thus "compatible" with Assistive Technologies.
Class AbstractAccessible
The vast majority of UI components in Java are extensions of the class java.awt.Component. The java.awt.Component contains public methods for retrieving accessibility information needed to be "compatible" in Assistive Technologies. Interface Accessible contains methods from java.awt.Component that most UI components don't need to do anything special with, so by extending java.awt.component they have everything they need.

class AbstractAccessible contains a default implementation of many of the Accessibility methods in java.awt.Component. It's provided as a convenience to application developers who are creating UI components that do not extend java.awt.component so that they can easily support interface Accessible on those UI components by making them extend AbstractAccessible. The Swing component JTabbedPane uses this class for one of it's inner classes, class Page, which is a very lightweight class for implementing the individual tabs of the JTabbedPane. By having Page extend AbstractAccessible, Page only needed to have add a few methods from interface Accessible in order to provide the necessary accessibility support to be "compatible" with Assistive Technologies.

Class AccessibleEnumeration
Class AccessibleEnumeration contains the base class from which the classes AccessibleRole and AccessibleState extend. It is a simple class that provides common methods for getting an enumeration of localized named properties, and provides the underlying support for making Role and State localizable, extensible, and yet very fast in runtime use for the commonly defined set of roles and states.
Class AccessibleResourceBundle
Class AccessibleResourceBundle contains the set of standard named properties, which should be localized in every language that the application runs in. Any property on the list will be retrievable via the toDisplayString() method in AccessibleEnumeration, AccessibleRole and AccessibleState very efficiently and quickly. Properties not on this list will also be retrievable fully localized via toDisplayString(), but will incur a bit more overhead (the price paid for extensibility).
Class AccessibleRole
Class AccessibleRole extends class AccessibleEnumeration and provides methods for encoding and retrieving the role of a UI component.
Class AccessibleState
Class AccessibleState extends class AccessibleEnumeration and provides methods for encoding and retrieving a single state of a set of possible states of a UI component.
Class AccessibleStateSet
Class AccessibleStateSet provides methods for encoding and retrieving the full set of possible states of a UI component, by collecting and managing a set of AccessibleState objects.

NOTE: This is a preliminary release of Java Accessibility. We reserve the right to modify the specification in future versions. 


Java Logo Copyright© 1995-97 Sun Microsystems, Inc. All Rights Reserved.
To submit comments or suggestions about Java Accessibility, please send mail to access@sun.com.

 

Sun MicroSystems