Appendix G: Active Accessibility Bridge to UI Automation
This appendix contains information about the Microsoft Active Accessibility Bridge. The Active Accessibility Bridge enables applications that implement Active Accessibility to access applications that implement UI Automation. By bridging Active Accessibility and UI Automation together, Active Accessibility-based clients, such as a screenreader on Windows XP, can programmatically interact with UI Automation-based providers of UI information, such as a Windows Presentation Foundation application. It is part of the UI Automation Native Core API (UIAutomationCore.dll).
The Active Accessibility Bridge maps UI Automation properties and events to those of Active Accessibility. The following tables map the Active Accessibility IAccessible interface methods and properties to UI Automation. Use these tables to determine appropriate coding practices for developing your Active Accessibility-based client.
Navigation and Hierarchy Properties
IAccessible property | UI Automation property |
---|---|
get_accChild | Not implemented |
get_accChildCount | Derived from UI Automation tree |
get_accParent | Derived from UI Automation tree |
accNavigate | Not implemented |
Descriptive Properties and Methods
IAccessible | UI Automation |
---|---|
accDoDefaultAction | See the Control Type and accRole table for details. |
get_accDefaultAction | See the Control Type and accRole table for details. |
get_accKeyboardShortcut | AccessKeyProperty or AcceleratorKey; if both present, AccessKey takes precedence. |
get_accName | NameProperty |
get_accRole | ControlTypeProperty. See the Control Type and accRole table for details. |
get_accState | See the Control Type and accRole table for details. |
get_accValue | ValueProperty; supported on control types that support ValuePattern or RangeValuePattern. RangeValue values are consistent with Active Accessibility behavior (0 to 100). Value items use a string. |
put_accValue | ValueProperty; supported on control types that supports ValuePattern or RangeValuePattern |
get_accHelp | HelpTextProperty |
get_accDescription | Not implemented |
get_accHelpTopic | Not implemented |
Control Types and accRole
The Active Accessibility default role is ROLE_SYSTEM_CLIENT. If no default action is found for a control type, the Active Accessibility Bridge will also use the following available patterns: Invoke, ExpandCollapse, and Toggle. For example, a groupbox control has no default action. If it supports ExpandCollapse, then the Active Accessibility Bridge will use that for the default action.
UI Automation control type | accRole | Default action |
---|---|---|
Button | ROLE_SYSTEM_PUSHBUTTON | Press |
Calendar | ROLE_SYSTEM_CLIENT | None |
CheckBox | ROLE_SYSTEM_CHECKBUTTON | Check/Uncheck (toggle) |
ComboBox | ROLE_SYSTEM_COMBOBOX | None |
Custom | ROLE_SYSTEM_CLIENT | None |
DataGrid | ROLE_SYSTEM_LIST | None |
DataItem | ROLE_SYSTEM_LISTITEM | None |
Document | ROLE_SYSTEM_DOCUMENT | None |
Edit | ROLE_SYSTEM_TEXT | None |
Group | ROLE_SYSTEM_GROUPING | None |
Header | ROLE_SYSTEM_LIST | None |
HeaderItem | ROLE_SYSTEM_COLUMNHEADER | Click |
Hyperlink | ROLE_SYSTEM_LINK | Jump (maps to Invoke) |
Image | ROLE_SYSTEM_GRAPHIC | None |
List | ROLE_SYSTEM_LIST | None |
ListItem | ROLE_SYSTEM_LISTITEM | Double click |
Menu | ROLE_SYSTEM_MENUPOPUP | None |
MenuBar | ROLE_SYSTEM_MENUBAR | None |
MenuItem | ROLE_SYSTEM_MENUITEM | Execute or Open/Close for menu items that have children. |
Pane | ROLE_SYSTEM_PANE | None |
ProgressBar | ROLE_SYSTEM_PROGRESSBAR | None |
RadioButton | ROLE_SYSTEM_RADIOBUTTON | Check |
ScrollBar | ROLE_SYSTEM_SCROLLBAR | None |
Slider | ROLE_SYSTEM_SLIDER | None |
Spinner | ROLE_SYSTEM_SPINBUTTON | None |
SplitButton | ROLE_SYSTEM_SPLITBUTTON | None |
StatusBar | ROLE_SYSTEM_STATUSBAR | None |
Tab | ROLE_SYSTEM_PAGETABLIST | None |
TabItem | ROLE_SYSTEM_PAGETAB | Switch |
Table | ROLE_SYSTEM_TABLE | None |
Text | ROLE_SYSTEM_STATICTEXT | None |
Thumb | ROLE_SYSTEM_INDICATOR | None |
TitleBar | ROLE_SYSTEM_TITLEBAR | None |
ToolBar | ROLE_SYSTEM_TOOLBAR | None |
ToolTip | ROLE_SYSTEM_TOOLTIP | None |
Tree | ROLE_SYSTEM_OUTLINE | None |
TreeItem | ROLE_SYSTEM_OUTLINEITEM | Expand or Collapse |
Window | ROLE_SYSTEM_WINDOW | None |
UI Automation Properties and accState
accState | UI Automation property | Triggers state change |
---|---|---|
STATE_SYSTEM_CHECKED | For ControlType = "checkbox" use ToggleState.On. For "radiobutton" use SelectionItemPattern.IsSelected. | Yes |
STATE_SYSTEM_FOCUSABLE | IsKeyboardFocusableProperty | No |
STATE_SYSTEM_FOCUSED | HasKeyboardFocusProperty | No |
STATE_SYSTEM_PROTECTED | IsPasswordProperty | No |
STATE_SYSTEM_READONLY | IsReadOnlyPropery (ValuePattern and RangeValuePattern) | No |
STATE_SYSTEM_UNAVAILABLE | IsEnabledProperty | Yes |
STATE_SYSTEM_LINKED | ControlTypeProperty = "hyperlink" | No |
STATE_SYSTEM_SELECTABLE | SelectionItemPattern is supported | No |
STATE_SYSTEM_SELECTED | IsSelectedProperty (SelectionItemPattern) | No |
STATE_SYSTEM_COLLAPSED | ExpandCollapseState = Collapsed | Yes |
STATE_SYSTEM_EXPANDED | ExpandCollapseState = Expanded or PartiallyExpanded | Yes |
STATE_SYSTEM_HASPOPUP | Menu items that support Expand/Collapse | No |
STATE_SYSTEM_MIXED | ToggleState = Indeterminate | No |
STATE_SYSTEM_SIZEABLE | TransformPattern.CanResize | No |
STATE_SYSTEM_MOVEABLE | TransformPattern.CanMove | No |
STATE_SYSTEM_MULTISELECTABLE | SelectionPattern.CanSelectMultiple | No |
Selection and Focus
IAccessible | UI Automation |
---|---|
get_accFocus | FocusedElement |
accSelect | See the UI Automation Properties and accSelect SELFLAGs table for details. |
get_accSelection | SelectionPattern.GetSelection |
UI Automation Properties and accSelect SELFLAGs
accSelect SELFLAGs | UI Automation property |
---|---|
SELFLAG_NONE | Not available |
SELFLAG_TAKFOCUS | SetFocus |
SELFLAG_TAKESELECTION | SelectionItemPattern.Select |
SELFLAG_ADDSELECTION | SelectionItemPattern.AddToSelection |
SELFLAG_TAKEREMOVESELECTION | SelectionItemPattern.RemoveFromSelection |
SELFLAG_EXTENDSELECTION | Not available |
Spatial Mapping
IAccessible | UI Automation |
---|---|
accLocation | BoundingRectangleProperty |
accHitTest | ElementProviderFromPoint |
Events
System-Level Event Constants
UI Automation
EVENT_SYSTEM_MENUPOPUPSTART
MenuOpenedEvent (Note: Must check if this is a pop-up window.)
EVENT_SYSTEM_MENUPOPUPEND
MenuClosedEvent
EVENT_SYSTEM_MENUSTART
Not available
EVENT_SYSTEM_MENUEND
Not available
EVENT_SYSTEM_SOUND
Not available
EVENT_SYSTEM_ALERT
EVENT_SYSTEM_CAPTURESTART
Not relevant
EVENT_SYSTEM_CAPTUREEND
Not relevant
EVENT_SYSTEM_DIALOGSTART
Not available
EVENT_SYSTEM_DIALOGEND
Not available
EVENT_SYSTEM_MOVESIZESTART
EVENT_SYSTEM_MOVESIZEEND
EVENT_SYSTEM_CONTEXTHELPSTART
EVENT_SYSTEM_CONTEXTHELPEND
Not relevant
EVENT_SYSTEM_DRAGDROPSTART
EVENT_SYSTEM_DRAGDROPEND
EVENT_SYSTEM_SWITCHSTART
Not relevant
EVENT_SYSTEM_SWITCHEND
Not relevant
EVENT_SYSTEM_MINIMIZESTART
EVENT_SYSTEM_MINIMIZEEND
EVENT_SYSTEM_FOREGROUND
EVENT_SYSTEM_SCROLLINGSTART
Not available
EVENT_SYSTEM_SCROLLINGEND
Not available
Object-Level Event Constants | UI Automation |
---|---|
EVENT_OBJECT_FOCUS | AutomationFocusChangedEvent |
EVENT_OBJECT_VALUECHANGE | ValueProperty (ValuePattern and RangeValuePattern) |
EVENT_OBJECT_SELECTION | ElementSelectedEvent (SelectionItemPattern) |
EVENT_OBJECT_SELECTIONADD | ElementAddedToSelectionEvent (SelectionItemPattern) |
EVENT_OBJECT_SELECTIONREMOVE | ElementRemovedFromSelectionEvent |
EVENT_OBJECT_STATECHANGE | See UI Automation Properties and accState table for states that trigger a state change |
EVENT_OBJECT_SELECTIONREMOVE | ElementRemovedFromSelectionEvent |