Accessibility Architecture

The design is based on Microsoft UI Automation which helps provide us a low overhead path to implementation on Windows. This design scales well to NSAccessibility protocol on Mac platform too.

 <Insert image FXDesign.png>

Overview

AccessibleStage initializes and maintains a graph of all accessible implementation of UI controls. Every node in the scene graph can support accessibility by returning a corresponding object that implements accessibility, using the method getAccessible().

The super class of all components supporting accessibility is AccessibleNode. AccessibleNode implements AccessibleProvider. AccessibleNode maintains a reference to the Glass accessible object which in turn creates/maintains a reference to the native accessible object..

AccessibleStage is responsible for creating the native object and associating it with the AccessibleNode.

Each control defines its accessible providers by super class AccessibleNode or subclassed implementation for control specific providers.

Example AccessibleButton, AccessibleList, and AccessibleMenu.

Accessible providers

Accessible providers are a package of interfaces which define the accessible behavior of controls. A control may have one or more providers it may implement. AccessibleProvider is the base provider for any control to support accessibility. Multiple providers implemented by controls define its accessible behavior.

See package com.sun.javafx.accessible.providers for a list of providers.

AccessibleProvider

AccessibleStageProvider

ExpandCollapseProvider

GridItemProvider

GridProvider

InvokeProvider

RangeValueProvider

SelectionItemProvider

SelectionProvider

ToggleProvider

ValueProvider

<TODO:> Add short description of the features of the various providers.

 

Accessible utils

Accessible utils define static identifierts used by accessible providers applicable to various controls.

See package com.sun.javafx.accessible.utils for list of values.

ControlTypeIds

EventIds

ExpandCollapseState

NavigateDirection

OrientationType

PatternIds

PropertyIds

ProviderOptions

Rect

ToggleState

 

Accessibility Initialization

Accessibility is initialized, using the following flow of events:

On Windows / Mac:

(WM_GETOBJECT / accessibilityAttributeNames) → Bridge calls up into glass to Window → notifyInitAccessibility()

This call passes through quantum → StagePeerListener → which instantiates AccessibleStage.

AccessibleStage

AccessibleStage : initAccessibleHierarchy ()

 

AccessibleStage : updateAccessibleHierarchy ()

 

AccessibleStage : FocusChangeListener ()

 

AccessibleNode

 

AccessibleText

 

AccessibleControl

All controls extends from AccessibleControl

AccessibleButton

AccessibleRadioButton

 

AccessibleList

AccessibleListItem

 

AccessibleCheckBox

AccessibleSlider

 

<TODO:Add other Controls>