blob: 78ac0b65dc535bc7ad2331bbfca23a817479a649 [file] [log] [blame] [view]
Kevin Babbitt805b7812021-06-14 18:18:161# UI Automation
2
3[UI Automation (UIA)](https://docs.microsoft.com/en-us/windows/win32/winauto/entry-uiauto-win32)
Greg Thompson59edafe22023-06-15 08:05:164is the modern accessibility API on Windows. The Chromium UIA provider is
5currently under development. It can be enabled via the
6`--enable-features=UiaProvider` browser command line switch.
Kevin Babbitt805b7812021-06-14 18:18:167
8## Key Features
9
10### Clients and Providers
11
12UI Automation exposes two different sets of interfaces. One is intended for
13clients such as assistive technologies and automation frameworks. The other is
14intended for providers such as UI widget frameworks and applications that render
15their own content. Chromium implements the UI Automation provider APIs.
16
17Clients and providers do not talk directly to one another. Instead, the
18operating system gathers data from providers to present a unified tree view
19across all open applications to the client.
20
21Further reading:
22
23* [UI Automation Provider Programmer's Guide](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-providerportal)
24* [UI Automation Client Programmer's Guide](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-clientportal)
25
26### Views of the UI Automation tree
27
28Clients have the ability to filter the UI Automation tree to various subsets of
29nodes. Tools such as Windows Narrator take advantage of this capability to skip
30over structural details that might be interesting to an automation framework but
31aren't relevant to a screen reader.
32
33Providers can set two properties on a node to determine which views it appears
34in: IsControlElement and IsContentElement. Getting the value of these properties
35right is critical to ensuring assistive technologies can get the information
36they need. Despite the names, there are many cases where nodes that might not be
37considered a "control" should appear in the Control view of the tree. A good
38litmus test is: if there's a reason a screen reader might be interested in a
39node, it should appear in the control view.
40
41Further reading:
42
43* [UI Automation Tree Overview](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-treeoverview)
44
45### TextPattern
46
47In addition to the tree view, UI Automation exposes a linear reading view
48through an API known as TextPattern. This API allows a screen reader to navigate
49text in more natural ways - characters, words, sentences, paragraphs, pages -
50without worrying about the underlying tree structure. Windows Narrator relies
51heavily on TextPattern for reading.
52
53Further reading:
54
55* [Text and TextRange Control Patterns](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-implementingtextandtextrange)