Other Accessible Objects
Before going further, there are several simple objects in the
Accessibility package used by
AccessibleContext that we should discuss in more
detail.
AccessibleState
Each accessible component can have one or
more states associated with it. An assistive technology can query
these states at any time to determine how best to deal with the
component. The accessible states can only be retrieved, however, and
not set. There are two classes that the Accessible
package uses to handle states: AccessibleState and
AccessibleStateSet.
The AccessibleState class contains an enumeration
of static objects that define states that any accessible component
can have. Note that a component can be in more than one state at any
time. A list of the possible states that an accessible object can be
in, along with a brief description of each, is shown in Table 25.3.
Table 25-3. AccessibleState Constants
|
State |
Meaning |
|---|---|
|
|
The window, dialog, or frame is the active one |
|
|
The object, such as a button, has been pressed but not released, and the mouse cursor is still over the button |
|
|
The object is busy processing and should not be interrupted |
|
|
The object is checked |
|
|
The object, such as a node in a tree, is collapsed |
|
|
The object supports any form of editing |
|
|
The object is enabled |
|
|
The object, such as a node in a tree, can report its children |
|
|
The object, such as a node in a tree, is expanded ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access