@@ -70,6 +70,7 @@ type ARIADocumentStructureRole =
70
70
| 'insertion'
71
71
| 'list'
72
72
| 'listitem'
73
+ | 'mark'
73
74
| 'math'
74
75
| 'meter'
75
76
| 'none'
@@ -166,36 +167,48 @@ type ARIARole =
166
167
| ARIALandmarkRole
167
168
| ARIALiveRegionRole
168
169
| ARIAWindowRole
169
- | ARIAUncategorizedRole ;
170
+ | ARIAUncategorizedRole
171
+ | ARIADPubRole
172
+ | ARIAGraphicsRole ;
170
173
171
174
type ARIARoleDefinitionKey =
172
175
ARIAAbstractRole
173
176
| ARIARole
174
177
| ARIADPubRole
175
178
| ARIAGraphicsRole ;
176
179
177
- type ARIARoleDefinition = {
180
+ type ARIANameFromSources =
181
+ 'author'
182
+ | 'contents'
183
+ | 'prohibited' ;
184
+
185
+ type ARIARoleDefinition = { |
178
186
/* Abstract roles may not be used in HTML. */
179
187
abstract : boolean ,
188
+ accessibleNameRequired : boolean ,
180
189
/* The concepts in related domains that inform behavior mappings. */
181
190
baseConcepts : Array < ARIARoleRelation > ,
182
191
/* Child presentational roles strip child nodes of roles and flatten the
183
192
* content to text. */
184
193
childrenPresentational : boolean ,
194
+ nameFrom ?: Array < ARIANameFromSources > ,
185
195
/* aria-* properties and states disallowed on this role. */
186
196
prohibitedProps : $Keys < ARIAPropertyMap > [ ] ,
187
197
/* aria-* properties and states allowed on this role. */
188
198
props : ARIAPropertyMap ,
189
199
/* The concepts in related domains that inform behavior mappings. */
190
200
relatedConcepts : Array < ARIARoleRelation > ,
201
+ requireContextRole ?: Array < ARIARole > ,
202
+ requiredContextRole ?: Array < ARIARole > ,
203
+ requiredOwnedElements ?: Array < Array < string >> ,
191
204
/* aria-* properties and states required on this role. */
192
205
requiredProps : ARIAPropertyMap ,
193
206
/* An array or super class "stacks." Each stack contains a LIFO list of
194
207
* strings correspond to a super class in the inheritance chain of this
195
208
* role. Roles may have more than one inheritance chain, which is why
196
209
* this property is an array of arrays and not a single array. */
197
210
superClass : Array < Array < ARIAAbstractRole | ARIARole | ARIADPubRole >> ,
198
- } ;
211
+ | } ;
199
212
200
213
type RoleDefinitionTuple = [ ARIARoleDefinitionKey , ARIARoleDefinition ] ;
201
214
type RoleDefinitions = Array < RoleDefinitionTuple > ;
@@ -215,12 +228,15 @@ type ARIAProperty =
215
228
'aria-activedescendant'
216
229
| 'aria-atomic'
217
230
| 'aria-autocomplete'
231
+ | 'aria-braillelabel'
232
+ | 'aria-brailleroledescription'
218
233
| 'aria-colcount'
219
234
| 'aria-colindex'
220
235
| 'aria-colspan'
221
236
| 'aria-controls'
222
237
| 'aria-current'
223
238
| 'aria-describedby'
239
+ | 'aria-description'
224
240
| 'aria-details'
225
241
| 'aria-dropeffect'
226
242
| 'aria-errormessage'
@@ -255,29 +271,30 @@ type ARIAProperty =
255
271
256
272
// {| [AriaProperty]?: mixed |}
257
273
type ARIAPropertyMap = { |
258
- 'aria-busy' ? : mixed ,
259
- 'aria-checked' ? : mixed ,
260
- 'aria-disabled' ? : mixed ,
261
- 'aria-expanded' ? : mixed ,
262
- 'aria-grabbed' ? : mixed ,
263
- 'aria-hidden' ? : mixed ,
264
- 'aria-invalid' ? : mixed ,
265
- 'aria-pressed' ? : mixed ,
266
- 'aria-selected' ? : mixed ,
267
274
'aria-activedescendant' ? : mixed ,
268
275
'aria-atomic' ? : mixed ,
269
276
'aria-autocomplete' ? : mixed ,
277
+ 'aria-braillelabel' ? : mixed ,
278
+ 'aria-brailleroledescription' ? : mixed ,
279
+ 'aria-busy' ? : mixed ,
280
+ 'aria-checked' ? : mixed ,
270
281
'aria-colcount' ? : mixed ,
271
282
'aria-colindex' ? : mixed ,
272
283
'aria-colspan' ? : mixed ,
273
284
'aria-controls' ? : mixed ,
274
285
'aria-current' ?: ?ARIAPropertyCurrent ,
275
286
'aria-describedby' ?: mixed ,
287
+ 'aria-description' ? : mixed ,
276
288
'aria-details' ? : mixed ,
289
+ 'aria-disabled' ? : mixed ,
277
290
'aria-dropeffect' ? : mixed ,
278
291
'aria-errormessage' ? : mixed ,
292
+ 'aria-expanded' ? : mixed ,
279
293
'aria-flowto' ? : mixed ,
294
+ 'aria-grabbed' ? : mixed ,
280
295
'aria-haspopup' ? : mixed ,
296
+ 'aria-hidden' ? : mixed ,
297
+ 'aria-invalid' ? : mixed ,
281
298
'aria-keyshortcuts' ? : mixed ,
282
299
'aria-label' ? : mixed ,
283
300
'aria-labelledby' ? : mixed ,
@@ -290,13 +307,15 @@ type ARIAPropertyMap = {|
290
307
'aria-owns' ? : mixed ,
291
308
'aria-placeholder' ? : mixed ,
292
309
'aria-posinset' ? : mixed ,
310
+ 'aria-pressed' ? : mixed ,
293
311
'aria-readonly' ? : mixed ,
294
312
'aria-relevant' ? : mixed ,
295
313
'aria-required' ? : mixed ,
296
314
'aria-roledescription' ? : mixed ,
297
315
'aria-rowcount' ? : mixed ,
298
316
'aria-rowindex' ? : mixed ,
299
317
'aria-rowspan' ? : mixed ,
318
+ 'aria-selected' ? : mixed ,
300
319
'aria-setsize' ? : mixed ,
301
320
'aria-sort' ? : mixed ,
302
321
'aria-valuemax' ? : mixed ,
@@ -305,7 +324,7 @@ type ARIAPropertyMap = {|
305
324
'aria-valuetext' ? : mixed ,
306
325
| } ;
307
326
308
- type ARIAPropertyDefinition = {
327
+ type ARIAPropertyDefinition = { |
309
328
type : 'string'
310
329
| 'id'
311
330
| 'idlist'
@@ -317,7 +336,7 @@ type ARIAPropertyDefinition = {
317
336
| 'tristate' ,
318
337
values ?: Array < string | boolean > ,
319
338
allowundefined ?: boolean ,
320
- } ;
339
+ | } ;
321
340
322
341
type ARIAPropertyCurrent =
323
342
'page'
@@ -330,31 +349,44 @@ type ARIAPropertyCurrent =
330
349
| true
331
350
| false ;
332
351
333
- type ARIARoleRelation = {
352
+ type ARIARoleRelation = { |
334
353
module ? : string ,
335
354
concept ? : ARIARoleRelationConcept ,
336
- } ;
355
+ | } ;
337
356
338
357
/* The concept in a related domain that informs behavior mappings.
339
358
* Related domains include: HTML, "Device Independence Delivery Unit", XForms,
340
359
* and ARIA to name a few. */
341
- type ARIARoleRelationConcept = {
360
+ type ARIARoleRelationConcept = { |
342
361
name : string ,
343
362
attributes ?: Array < ARIARoleRelationConceptAttribute > ,
344
363
// These constraints are drawn from the mapping between ARIA and HTML:
345
364
// https://www.w3.org/TR/html-aria
346
- constraints ?: Array < 'direct descendant of document'
347
- | 'direct descendant of ol, ul or menu'
365
+ constraints ?: Array <
366
+ | 'scoped to the body element'
367
+ | 'scoped to the main element'
368
+ | 'scoped to a sectioning root element other than body'
369
+ | 'scoped to a sectioning content element'
370
+ | 'direct descendant of document'
371
+ | 'direct descendant of ol'
372
+ | 'direct descendant of ul'
373
+ | 'direct descendant of menu'
348
374
| 'direct descendant of details element with the open attribute defined'
349
- | 'descendant of table' > ,
350
- } ;
375
+ | 'ancestor table element has table role'
376
+ | 'ancestor table element has grid role'
377
+ | 'ancestor table element has treegrid role'
378
+ | 'the progress bar is determinate'
379
+ | 'the datalist selection model allows multiple option elements to be selected at a time'
380
+ | 'the aria-controls attribute is set to the same value as the list attribute'
381
+ | 'the size attribute value is greater than 1'
382
+ | 'the multiple attribute value is greater than 1'
383
+ | 'the multiple attribute and the size attribute do not have a value greater than 1'
384
+ | 'the list attribute is not set' > ,
385
+ | } ;
351
386
352
- type ARIARoleRelationConceptAttribute = {
387
+ type ARIARoleRelationConceptAttribute = { |
353
388
name : string ,
354
389
value ?: string | number ,
355
390
// These constraints are drawn from the mapping between ARIA and HTML:
356
391
// https://www.w3.org/TR/html-aria
357
- constraints ?: Array < 'undefined' // The attribute does not exist on the node: <a>
358
- | 'set' // The attribute has a value: <a b="c">
359
- | '>1' > ,
360
- } ;
392
+ | } ;
0 commit comments