1
1
// Source: https://www.w3.org/TR/wai-aria-1.1/#roles
2
+ // Source for abstract roles (types): https://www.w3.org/TR/wai-aria/#abstract_roles
2
3
3
4
/* easiest way to see allowed roles is to filter out the global ones
4
5
from the list of inherited states and properties. The dpub spec
17
18
*/
18
19
const ariaRoles = {
19
20
alert : {
20
- type : 'widget ' ,
21
+ type : 'structure ' ,
21
22
// Spec difference: Aria-expanded removed in 1.2
22
23
allowedAttrs : [ 'aria-expanded' ] ,
23
24
superclassRole : [ 'section' ]
24
25
} ,
25
26
alertdialog : {
26
- type : 'widget ' ,
27
+ type : 'window ' ,
27
28
// Spec difference: Aria-expanded removed in 1.2
28
29
allowedAttrs : [ 'aria-expanded' , 'aria-modal' ] ,
29
30
superclassRole : [ 'alert' , 'dialog' ] ,
@@ -119,6 +120,7 @@ const ariaRoles = {
119
120
nameFromContent : true
120
121
} ,
121
122
combobox : {
123
+ // Note: spec difference
122
124
type : 'widget' ,
123
125
requiredAttrs : [ 'aria-expanded' , 'aria-controls' ] ,
124
126
allowedAttrs : [
@@ -169,7 +171,7 @@ const ariaRoles = {
169
171
prohibitedAttrs : [ 'aria-label' , 'aria-labelledby' ]
170
172
} ,
171
173
dialog : {
172
- type : 'widget ' ,
174
+ type : 'window ' ,
173
175
// Spec difference: Aria-expanded removed in 1.2
174
176
allowedAttrs : [ 'aria-expanded' , 'aria-modal' ] ,
175
177
superclassRole : [ 'window' ] ,
@@ -301,6 +303,7 @@ const ariaRoles = {
301
303
superclassRole : [ 'section' ]
302
304
} ,
303
305
listbox : {
306
+ // Note: spec difference
304
307
type : 'widget' ,
305
308
requiredOwned : [ 'group' , 'option' ] ,
306
309
allowedAttrs : [
@@ -328,7 +331,7 @@ const ariaRoles = {
328
331
nameFromContent : true
329
332
} ,
330
333
log : {
331
- type : 'widget ' ,
334
+ type : 'structure ' ,
332
335
// Spec difference: Aria-expanded removed in 1.2
333
336
allowedAttrs : [ 'aria-expanded' ] ,
334
337
superclassRole : [ 'section' ]
@@ -340,7 +343,7 @@ const ariaRoles = {
340
343
superclassRole : [ 'landmark' ]
341
344
} ,
342
345
marquee : {
343
- type : 'widget ' ,
346
+ type : 'structure ' ,
344
347
// Spec difference: Aria-expanded removed in 1.2
345
348
allowedAttrs : [ 'aria-expanded' ] ,
346
349
superclassRole : [ 'section' ]
@@ -696,7 +699,7 @@ const ariaRoles = {
696
699
accessibleNameRequired : true
697
700
} ,
698
701
status : {
699
- type : 'widget ' ,
702
+ type : 'structure ' ,
700
703
// Spec difference: Aria-expanded removed in 1.2
701
704
allowedAttrs : [ 'aria-expanded' ] ,
702
705
superclassRole : [ 'section' ]
@@ -816,7 +819,7 @@ const ariaRoles = {
816
819
superclassRole : [ 'section' ]
817
820
} ,
818
821
timer : {
819
- type : 'widget ' ,
822
+ type : 'structure ' ,
820
823
// Spec difference: Aria-expanded removed in 1.2
821
824
allowedAttrs : [ 'aria-expanded' ] ,
822
825
superclassRole : [ 'status' ]
0 commit comments