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 Microsoft Active Accessibility to access applications that implement Microsoft UI Automation. By bridging Microsoft Active Accessibility and UI Automation together, Microsoft Active Accessibility-based clients, such as a screenreader on Windows XP, can programmatically interact with UI Automation-based providers of UI Automation, such as a Windows Presentation Foundation (WPF) 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 Microsoft Active Accessibility. The following tables map the Microsoft Active Accessibility IAccessible interface methods and properties to UI Automation. Use these tables to determine appropriate coding practices for developing your Microsoft 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 Types and accRole table for details. |
get_accDefaultAction | See the Control Types and accRole table for details. |
get_accKeyboardShortcut | AccessKeyPropertyor AcceleratorKeyProperty; if both present, AccessKeyProperty takes precedence. |
get_accName | NameProperty |
get_accRole | ControlTypeProperty. See the Control Types and accRole table for details. |
get_accState | See the Control Types and accRole table for details. |
get_accValue | ValueProperty; supported on control types that support the Value control pattern or RangeValue control pattern control pattern. RangeValue values are consistent with Microsoft Active Accessibility behavior (0 to 100). Value items use a string. |
put_accValue | ValueProperty; supported on control types that support the Value control pattern or RangeValue control pattern |
get_accHelp | HelpTextProperty |
get_accDescription | Not implemented |
get_accHelpTopic | Not implemented |
Control Types and accRole
The Microsoft 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 control 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 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 | IsReadOnlyProperty (Value control pattern and RangeValue control pattern) | No |
STATE_SYSTEM_UNAVAILABLE | IsEnabledProperty | Yes |
STATE_SYSTEM_LINKED | ControlTypeProperty = "hyperlink" | No |
STATE_SYSTEM_SELECTABLE | SelectionItemPattern is supported | No |
STATE_SYSTEM_SELECTED | IsSelectedProperty (SelectionItem control pattern) | 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 | IUIAutomationTransformPattern::CanResize | No |
STATE_SYSTEM_MOVEABLE | IUIAutomationTransformPattern::CanMove | No |
STATE_SYSTEM_MULTISELECTABLE | IUIAutomationSelectionPattern::CanSelectMultiple | No |
Selection and Focus
IAccessible | UI Automation |
---|---|
get_accFocus | IUIAutomation::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 | IUIAutomationElement::SetFocus |
SELFLAG_TAKESELECTION | IUIAutomationSelectionItemPattern::Select |
SELFLAG_ADDSELECTION | IUIAutomationSelectionItemPattern::AddToSelection |
SELFLAG_TAKEREMOVESELECTION | IUIAutomationSelectionItemPattern::RemoveFromSelection |
SELFLAG_EXTENDSELECTION | Not available |
Spatial Mapping
IAccessible | UI Automation |
---|---|
accLocation | BoundingRectangleProperty |
accHitTest | IRawElementProviderFragmentRoot::ElementProviderFromPoint |
Events
System-Level Event Constants | UI Automation |
---|---|
EVENT_SYSTEM_MENUPOPUPSTART | UIA_MenuOpenedEventId (Note: Must check if this is a pop-up window.) |
EVENT_SYSTEM_MENUPOPUPEND | UIA_MenuClosedEventId |
EVENT_SYSTEM_MENUSTART | UIA_MenuModeStartEventId |
EVENT_SYSTEM_MENUEND | UIA_MenuModeEndEventId |
EVENT_SYSTEM_SOUND | |
EVENT_SYSTEM_ALERT | |
EVENT_SYSTEM_CAPTURESTART | |
EVENT_SYSTEM_CAPTUREEND | |
EVENT_SYSTEM_DIALOGSTART | |
EVENT_SYSTEM_DIALOGEND | |
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 (Value control pattern and RangeValue control pattern) |
EVENT_OBJECT_SELECTION | ElementSelectedEvent (SelectionItem control pattern) |
EVENT_OBJECT_SELECTIONADD | ElementAddedToSelectionEvent (SelectionItem control pattern) |
EVENT_OBJECT_SELECTIONREMOVE | ElementRemovedFromSelectionEvent |
EVENT_OBJECT_SELECTIONWITHIN | EventsSelectionInvalidatedEvent |
EVENT_OBJECT_STATECHANGE | See UI Automation Properties and accState table for states that trigger a state change |