1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace": "experimental.accessibility",
"nodoc": true,
"types": [
{
"id": "AccessibilityObject",
"type": "object",
"description": "Parent class for accessibility information about an object.",
"properties": {
"type": {
"type": "string",
"description": "The type of this object, which determines the contents of 'details'.",
"enum": ["button", "checkbox", "combobox", "link", "menu", "menuitem", "radiobutton", "slider", "tab", "textbox", "window"]
},
"name": {
"type": "string",
"description": "The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future."
},
"context": {
"type": "string",
"description": "The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.",
"optional": true
},
"details": {
"description": "Other details like the state, depending on the type of object.",
"optional": true,
"choices": [
{ "$ref": "CheckboxDetails" },
{ "$ref": "ComboBoxDetails" },
{ "$ref": "MenuDetails" },
{ "$ref": "MenuItemDetails" },
{ "$ref": "RadioButtonDetails" },
{ "$ref": "SliderDetails" },
{ "$ref": "TabDetails" },
{ "$ref": "TextBoxDetails" }
]
}
}
},
{
"id": "CheckboxDetails",
"type": "object",
"description": "Information about the state of a checkbox.",
"properties": {
"isChecked": {"type": "boolean", "description": "True if this checkbox is checked."}
}
},
{
"id": "ComboBoxDetails",
"type": "object",
"description": "Information about the state of a combo box.",
"properties": {
"value": {"type": "string", "description": "The value of the combo box."},
"itemCount": {"type": "integer", "description": "The number of items in the combo box's list."},
"itemIndex": {"type": "integer", "description": "The 0-based index of the current value, or -1 if the user entered a value not from the list."}
}
},
{
"id": "ListBoxDetails",
"type": "object",
"description": "Information about the state of a list box.",
"properties": {
"value": {"type": "string", "description": "The value of the list box."},
"itemCount": {"type": "integer", "description": "The number of items in the list."},
"itemIndex": {"type": "integer", "description": "The 0-based index of the selected value, or -1 if no items are selected."}
}
},
{
"id": "MenuDetails",
"type": "object",
"description": "Information about the state of a drop-down menu.",
"properties": {
}
},
{
"id": "MenuItemDetails",
"type": "object",
"description": "Information about a menu item.",
"properties": {
"hasSubmenu": {"type": "boolean", "description": "True if this item opens a submenu."},
"itemCount": {"type": "integer", "description": "The number of items in the menu."},
"itemIndex": {"type": "integer", "description": "The 0-based index of this menu item."}
}
},
{
"id": "RadioButtonDetails",
"type": "object",
"description": "Information about the state of a radio button.",
"properties": {
"isChecked": {"type": "boolean", "description": "True if this radio button is checked."},
"itemCount": {"type": "integer", "description": "The number of radio buttons in this group."},
"itemIndex": {"type": "integer", "description": "The 0-based index of this radio button in this group."}
}
},
{
"id": "SliderDetails",
"type": "object",
"description": "Information about the state of a slider.",
"properties": {
"stringValue": {"type": "string", "description": "The value of the slider as a string."}
}
},
{
"id": "TabDetails",
"type": "object",
"description": "Additional accessibility information about a tab.",
"properties": {
"itemCount": {"type": "integer", "description": "The number of tabs in this group."},
"itemIndex": {"type": "integer", "description": "The 0-based index of this tab in this group."}
}
},
{
"id": "TextBoxDetails",
"type": "object",
"description": "Information about the state of a text box.",
"properties": {
"value": {"type": "string", "description": "The value of the text box - the entered text."},
"isPassword": {"type": "boolean", "description": "True if this control contains password text whose contents should be obscured."},
"selectionStart": {"type": "integer", "description": "The index of the character where the selection starts, if this control contains editable text."},
"selectionEnd": {"type": "integer", "description": "The index of the character where the selection ends, if this control contains editable text."}
}
},
{
"id": "AlertInfo",
"type": "object",
"description": "Information about an alert",
"properties": {
"message": {
"type": "string",
"description": "The message the alert is showing."
}
}
}
],
"functions": [
{
"name": "setAccessibilityEnabled",
"type": "function",
"description": "Enables or disables the accessibility extension api. This must be set to true before event listeners or getFocusedControl will work.",
"parameters": [
{
"type": "boolean",
"name": "enabled",
"description": "True if accessibility support should be enabled."
}
]
},
{
"name": "getFocusedControl",
"type": "function",
"description": "Gets information about the currently focused control.",
"parameters": [
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "control",
"description": "Details of the currently focused control, or null if nothing is focused.",
"$ref": "AccessibilityObject",
"optional": true
}
]
}
]
},
{
"name": "getAlertsForTab",
"type": "function",
"description": "Gets alerts being shown on the given tab.",
"parameters": [
{
"name": "tabId",
"type": "integer",
"minimum": 0
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "alerts",
"type": "array",
"items": { "$ref": "AlertInfo" },
"description": "Alerts being shown on the given tab."
}
]
}
]
}
],
"events": [
{
"name": "onWindowOpened",
"type": "function",
"description": "Fired when a window is opened.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "window",
"description": "Information about the window that was opened."
}
]
},
{
"name": "onWindowClosed",
"type": "function",
"description": "Fired when a window is closed.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "window",
"description": "Information about the window that was closed."
}
]
},
{
"name": "onControlFocused",
"type": "function",
"description": "Fired when a control is focused.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "control",
"description": "Details of the control that was focused."
}
]
},
{
"name": "onControlAction",
"type": "function",
"description": "Fired when a control's action is taken, like pressing a button or toggling a checkbox.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "control",
"description": "Details of the control whose action was taken."
}
]
},
{
"name": "onTextChanged",
"type": "function",
"description": "Fired when text changes in an editable text control.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "control",
"description": "Details of the control where the text changed."
}
]
},
{
"name": "onMenuOpened",
"type": "function",
"description": "Fired when a menu is opened.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "menu",
"description": "Information about the menu that was opened."
}
]
},
{
"name": "onMenuClosed",
"type": "function",
"description": "Fired when a menu is closed.",
"parameters": [
{
"$ref": "AccessibilityObject",
"name": "menu",
"description": "Information about the menu that was closed."
}
]
}
]
}
]
|