@@ -85,9 +85,7 @@ ruleTester.run('role-supports-aria-props', rule, {
85
85
{ code : '<a href="#" aria-dropeffect />' } ,
86
86
{ code : '<a href="#" aria-flowto />' } ,
87
87
{ code : '<a href="#" aria-grabbed />' } ,
88
- { code : '<a href="#" aria-haspopup />' } ,
89
88
{ code : '<a href="#" aria-hidden />' } ,
90
- { code : '<a href="#" aria-invalid />' } ,
91
89
{ code : '<a href="#" aria-label />' } ,
92
90
{ code : '<a href="#" aria-labelledby />' } ,
93
91
{ code : '<a href="#" aria-live />' } ,
@@ -107,9 +105,7 @@ ruleTester.run('role-supports-aria-props', rule, {
107
105
{ code : '<area href="#" aria-dropeffect />' } ,
108
106
{ code : '<area href="#" aria-flowto />' } ,
109
107
{ code : '<area href="#" aria-grabbed />' } ,
110
- { code : '<area href="#" aria-haspopup />' } ,
111
108
{ code : '<area href="#" aria-hidden />' } ,
112
- { code : '<area href="#" aria-invalid />' } ,
113
109
{ code : '<area href="#" aria-label />' } ,
114
110
{ code : '<area href="#" aria-labelledby />' } ,
115
111
{ code : '<area href="#" aria-live />' } ,
@@ -129,9 +125,7 @@ ruleTester.run('role-supports-aria-props', rule, {
129
125
{ code : '<link href="#" aria-dropeffect />' } ,
130
126
{ code : '<link href="#" aria-flowto />' } ,
131
127
{ code : '<link href="#" aria-grabbed />' } ,
132
- { code : '<link href="#" aria-haspopup />' } ,
133
128
{ code : '<link href="#" aria-hidden />' } ,
134
- { code : '<link href="#" aria-invalid />' } ,
135
129
{ code : '<link href="#" aria-label />' } ,
136
130
{ code : '<link href="#" aria-labelledby />' } ,
137
131
{ code : '<link href="#" aria-live />' } ,
@@ -149,7 +143,6 @@ ruleTester.run('role-supports-aria-props', rule, {
149
143
150
144
// MENU TESTS - implicit role is `toolbar` when `type="toolbar"`
151
145
{ code : '<menu type="toolbar" aria-activedescendant />' } ,
152
- { code : '<menu type="toolbar" aria-expanded />' } ,
153
146
{ code : '<menu type="toolbar" aria-atomic />' } ,
154
147
{ code : '<menu type="toolbar" aria-busy />' } ,
155
148
{ code : '<menu type="toolbar" aria-controls />' } ,
@@ -158,9 +151,7 @@ ruleTester.run('role-supports-aria-props', rule, {
158
151
{ code : '<menu type="toolbar" aria-dropeffect />' } ,
159
152
{ code : '<menu type="toolbar" aria-flowto />' } ,
160
153
{ code : '<menu type="toolbar" aria-grabbed />' } ,
161
- { code : '<menu type="toolbar" aria-haspopup />' } ,
162
154
{ code : '<menu type="toolbar" aria-hidden />' } ,
163
- { code : '<menu type="toolbar" aria-invalid />' } ,
164
155
{ code : '<menu type="toolbar" aria-label />' } ,
165
156
{ code : '<menu type="toolbar" aria-labelledby />' } ,
166
157
{ code : '<menu type="toolbar" aria-live />' } ,
@@ -182,7 +173,6 @@ ruleTester.run('role-supports-aria-props', rule, {
182
173
{ code : '<menuitem type="command" aria-grabbed />' } ,
183
174
{ code : '<menuitem type="command" aria-haspopup />' } ,
184
175
{ code : '<menuitem type="command" aria-hidden />' } ,
185
- { code : '<menuitem type="command" aria-invalid />' } ,
186
176
{ code : '<menuitem type="command" aria-label />' } ,
187
177
{ code : '<menuitem type="command" aria-labelledby />' } ,
188
178
{ code : '<menuitem type="command" aria-live />' } ,
@@ -225,7 +215,6 @@ ruleTester.run('role-supports-aria-props', rule, {
225
215
{ code : '<menuitem type="radio" aria-owns />' } ,
226
216
{ code : '<menuitem type="radio" aria-relevant />' } ,
227
217
{ code : '<menuitem type="radio" aria-posinset />' } ,
228
- { code : '<menuitem type="radio" aria-selected />' } ,
229
218
{ code : '<menuitem type="radio" aria-setsize />' } ,
230
219
231
220
// these will have global
@@ -246,7 +235,6 @@ ruleTester.run('role-supports-aria-props', rule, {
246
235
{ code : '<input type="button" aria-grabbed />' } ,
247
236
{ code : '<input type="button" aria-haspopup />' } ,
248
237
{ code : '<input type="button" aria-hidden />' } ,
249
- { code : '<input type="button" aria-invalid />' } ,
250
238
{ code : '<input type="button" aria-label />' } ,
251
239
{ code : '<input type="button" aria-labelledby />' } ,
252
240
{ code : '<input type="button" aria-live />' } ,
@@ -265,7 +253,6 @@ ruleTester.run('role-supports-aria-props', rule, {
265
253
{ code : '<input type="image" aria-grabbed />' } ,
266
254
{ code : '<input type="image" aria-haspopup />' } ,
267
255
{ code : '<input type="image" aria-hidden />' } ,
268
- { code : '<input type="image" aria-invalid />' } ,
269
256
{ code : '<input type="image" aria-label />' } ,
270
257
{ code : '<input type="image" aria-labelledby />' } ,
271
258
{ code : '<input type="image" aria-live />' } ,
@@ -284,7 +271,6 @@ ruleTester.run('role-supports-aria-props', rule, {
284
271
{ code : '<input type="reset" aria-grabbed />' } ,
285
272
{ code : '<input type="reset" aria-haspopup />' } ,
286
273
{ code : '<input type="reset" aria-hidden />' } ,
287
- { code : '<input type="reset" aria-invalid />' } ,
288
274
{ code : '<input type="reset" aria-label />' } ,
289
275
{ code : '<input type="reset" aria-labelledby />' } ,
290
276
{ code : '<input type="reset" aria-live />' } ,
@@ -303,23 +289,21 @@ ruleTester.run('role-supports-aria-props', rule, {
303
289
{ code : '<input type="submit" aria-grabbed />' } ,
304
290
{ code : '<input type="submit" aria-haspopup />' } ,
305
291
{ code : '<input type="submit" aria-hidden />' } ,
306
- { code : '<input type="submit" aria-invalid />' } ,
307
292
{ code : '<input type="submit" aria-label />' } ,
308
293
{ code : '<input type="submit" aria-labelledby />' } ,
309
294
{ code : '<input type="submit" aria-live />' } ,
310
295
{ code : '<input type="submit" aria-owns />' } ,
311
296
{ code : '<input type="submit" aria-relevant />' } ,
312
297
// when `type="checkbox"`, the implicit role is `checkbox`
313
- { code : '<input type="checkbox" aria-checked />' } ,
314
298
{ code : '<input type="checkbox" aria-atomic />' } ,
315
299
{ code : '<input type="checkbox" aria-busy />' } ,
300
+ { code : '<input type="checkbox" aria-checked />' } ,
316
301
{ code : '<input type="checkbox" aria-controls />' } ,
317
302
{ code : '<input type="checkbox" aria-describedby />' } ,
318
303
{ code : '<input type="checkbox" aria-disabled />' } ,
319
304
{ code : '<input type="checkbox" aria-dropeffect />' } ,
320
305
{ code : '<input type="checkbox" aria-flowto />' } ,
321
306
{ code : '<input type="checkbox" aria-grabbed />' } ,
322
- { code : '<input type="checkbox" aria-haspopup />' } ,
323
307
{ code : '<input type="checkbox" aria-hidden />' } ,
324
308
{ code : '<input type="checkbox" aria-invalid />' } ,
325
309
{ code : '<input type="checkbox" aria-label />' } ,
@@ -328,25 +312,22 @@ ruleTester.run('role-supports-aria-props', rule, {
328
312
{ code : '<input type="checkbox" aria-owns />' } ,
329
313
{ code : '<input type="checkbox" aria-relevant />' } ,
330
314
// when `type="radio"`, the implicit role is `radio`
331
- { code : '<input type="radio" aria-checked />' } ,
332
315
{ code : '<input type="radio" aria-atomic />' } ,
333
316
{ code : '<input type="radio" aria-busy />' } ,
317
+ { code : '<input type="radio" aria-checked />' } ,
334
318
{ code : '<input type="radio" aria-controls />' } ,
335
319
{ code : '<input type="radio" aria-describedby />' } ,
336
320
{ code : '<input type="radio" aria-disabled />' } ,
337
321
{ code : '<input type="radio" aria-dropeffect />' } ,
338
322
{ code : '<input type="radio" aria-flowto />' } ,
339
323
{ code : '<input type="radio" aria-grabbed />' } ,
340
- { code : '<input type="radio" aria-haspopup />' } ,
341
324
{ code : '<input type="radio" aria-hidden />' } ,
342
- { code : '<input type="radio" aria-invalid />' } ,
343
325
{ code : '<input type="radio" aria-label />' } ,
344
326
{ code : '<input type="radio" aria-labelledby />' } ,
345
327
{ code : '<input type="radio" aria-live />' } ,
346
328
{ code : '<input type="radio" aria-owns />' } ,
347
329
{ code : '<input type="radio" aria-relevant />' } ,
348
330
{ code : '<input type="radio" aria-posinset />' } ,
349
- { code : '<input type="radio" aria-selected />' } ,
350
331
{ code : '<input type="radio" aria-setsize />' } ,
351
332
// when `type="range"`, the implicit role is `slider`
352
333
{ code : '<input type="range" aria-valuemax />' } ,
@@ -384,14 +365,7 @@ ruleTester.run('role-supports-aria-props', rule, {
384
365
{ code : '<h2 role="presentation" aria-level={undefined} />' } ,
385
366
386
367
// OTHER TESTS
387
- { code : '<aside aria-expanded />' } ,
388
- { code : '<article aria-expanded />' } ,
389
- { code : '<body aria-expanded />' } ,
390
368
{ code : '<button aria-pressed />' } ,
391
- { code : '<datalist aria-expanded />' } ,
392
- { code : '<details aria-expanded />' } ,
393
- { code : '<dialog aria-expanded />' } ,
394
- { code : '<dl aria-expanded />' } ,
395
369
{ code : '<form aria-hidden />' } ,
396
370
{ code : '<h1 aria-hidden />' } ,
397
371
{ code : '<h2 aria-hidden />' } ,
@@ -401,20 +375,12 @@ ruleTester.run('role-supports-aria-props', rule, {
401
375
{ code : '<h6 aria-hidden />' } ,
402
376
{ code : '<hr aria-hidden />' } ,
403
377
{ code : '<li aria-current />' } ,
404
- { code : '<li aria-expanded />' } ,
405
378
{ code : '<meter aria-atomic />' } ,
406
- { code : '<nav aria-expanded />' } ,
407
- { code : '<ol aria-expanded />' } ,
408
379
{ code : '<option aria-atomic />' } ,
409
- { code : '<output aria-expanded />' } ,
410
380
{ code : '<progress aria-atomic />' } ,
411
- { code : '<section aria-expanded />' } ,
412
- { code : '<select aria-expanded />' } ,
413
- { code : '<tbody aria-expanded />' } ,
414
381
{ code : '<textarea aria-hidden />' } ,
415
- { code : '<tfoot aria-expanded />' } ,
416
- { code : '<thead aria-expanded />' } ,
417
- { code : '<ul aria-expanded />' } ,
382
+ { code : '<select aria-expanded />' } ,
383
+ { code : '<datalist aria-expanded />' } ,
418
384
419
385
] . concat ( validTests ) . map ( parserOptionsMapper ) ,
420
386
@@ -444,5 +410,141 @@ ruleTester.run('role-supports-aria-props', rule, {
444
410
code : '<aside aria-checked />' ,
445
411
errors : [ errorMessage ( 'aria-checked' , 'complementary' , 'aside' , true ) ] ,
446
412
} ,
413
+ {
414
+ code : '<ul aria-expanded />' ,
415
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'ul' , true ) ] ,
416
+ } ,
417
+ {
418
+ code : '<details aria-expanded />' ,
419
+ errors : [ errorMessage ( 'aria-expanded' , 'group' , 'details' , true ) ] ,
420
+ } ,
421
+ {
422
+ code : '<dialog aria-expanded />' ,
423
+ errors : [ errorMessage ( 'aria-expanded' , 'dialog' , 'dialog' , true ) ] ,
424
+ } ,
425
+ {
426
+ code : '<dl aria-expanded />' ,
427
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'dl' , true ) ] ,
428
+ } ,
429
+ {
430
+ code : '<aside aria-expanded />' ,
431
+ errors : [ errorMessage ( 'aria-expanded' , 'complementary' , 'aside' , true ) ] ,
432
+ } ,
433
+ {
434
+ code : '<article aria-expanded />' ,
435
+ errors : [ errorMessage ( 'aria-expanded' , 'article' , 'article' , true ) ] ,
436
+ } ,
437
+ {
438
+ code : '<body aria-expanded />' ,
439
+ errors : [ errorMessage ( 'aria-expanded' , 'document' , 'body' , true ) ] ,
440
+ } ,
441
+ {
442
+ code : '<li aria-expanded />' ,
443
+ errors : [ errorMessage ( 'aria-expanded' , 'listitem' , 'li' , true ) ] ,
444
+ } ,
445
+ {
446
+ code : '<nav aria-expanded />' ,
447
+ errors : [ errorMessage ( 'aria-expanded' , 'navigation' , 'nav' , true ) ] ,
448
+ } ,
449
+ {
450
+ code : '<ol aria-expanded />' ,
451
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'ol' , true ) ] ,
452
+ } ,
453
+ {
454
+ code : '<output aria-expanded />' ,
455
+ errors : [ errorMessage ( 'aria-expanded' , 'status' , 'output' , true ) ] ,
456
+ } ,
457
+ {
458
+ code : '<section aria-expanded />' ,
459
+ errors : [ errorMessage ( 'aria-expanded' , 'region' , 'section' , true ) ] ,
460
+ } ,
461
+ {
462
+ code : '<tbody aria-expanded />' ,
463
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'tbody' , true ) ] ,
464
+ } ,
465
+ {
466
+ code : '<tfoot aria-expanded />' ,
467
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'tfoot' , true ) ] ,
468
+ } ,
469
+ {
470
+ code : '<thead aria-expanded />' ,
471
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'thead' , true ) ] ,
472
+ } ,
473
+ {
474
+ code : '<input type="radio" aria-invalid />' ,
475
+ errors : [ errorMessage ( 'aria-invalid' , 'radio' , 'input' , true ) ] ,
476
+ } ,
477
+ {
478
+ code : '<input type="radio" aria-selected />' ,
479
+ errors : [ errorMessage ( 'aria-selected' , 'radio' , 'input' , true ) ] ,
480
+ } ,
481
+ {
482
+ code : '<input type="radio" aria-haspopup />' ,
483
+ errors : [ errorMessage ( 'aria-haspopup' , 'radio' , 'input' , true ) ] ,
484
+ } ,
485
+ {
486
+ code : '<input type="checkbox" aria-haspopup />' ,
487
+ errors : [ errorMessage ( 'aria-haspopup' , 'checkbox' , 'input' , true ) ] ,
488
+ } ,
489
+ {
490
+ code : '<input type="reset" aria-invalid />' ,
491
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
492
+ } ,
493
+ {
494
+ code : '<input type="submit" aria-invalid />' ,
495
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
496
+ } ,
497
+ {
498
+ code : '<input type="image" aria-invalid />' ,
499
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
500
+ } ,
501
+ {
502
+ code : '<input type="button" aria-invalid />' ,
503
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
504
+ } ,
505
+ {
506
+ code : '<menuitem type="command" aria-invalid />' ,
507
+ errors : [ errorMessage ( 'aria-invalid' , 'menuitem' , 'menuitem' , true ) ] ,
508
+ } ,
509
+ {
510
+ code : '<menuitem type="radio" aria-selected />' ,
511
+ errors : [ errorMessage ( 'aria-selected' , 'menuitemradio' , 'menuitem' , true ) ] ,
512
+ } ,
513
+ {
514
+ code : '<menu type="toolbar" aria-haspopup />' ,
515
+ errors : [ errorMessage ( 'aria-haspopup' , 'toolbar' , 'menu' , true ) ] ,
516
+ } ,
517
+ {
518
+ code : '<menu type="toolbar" aria-invalid />' ,
519
+ errors : [ errorMessage ( 'aria-invalid' , 'toolbar' , 'menu' , true ) ] ,
520
+ } ,
521
+ {
522
+ code : '<menu type="toolbar" aria-expanded />' ,
523
+ errors : [ errorMessage ( 'aria-expanded' , 'toolbar' , 'menu' , true ) ] ,
524
+ } ,
525
+ {
526
+ code : '<link href="#" aria-invalid />' ,
527
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'link' , true ) ] ,
528
+ } ,
529
+ {
530
+ code : '<link href="#" aria-haspopup />' ,
531
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'link' , true ) ] ,
532
+ } ,
533
+ {
534
+ code : '<area href="#" aria-invalid />' ,
535
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'area' , true ) ] ,
536
+ } ,
537
+ {
538
+ code : '<area href="#" aria-haspopup />' ,
539
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'area' , true ) ] ,
540
+ } ,
541
+ {
542
+ code : '<a href="#" aria-haspopup />' ,
543
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'a' , true ) ] ,
544
+ } ,
545
+ {
546
+ code : '<a href="#" aria-invalid />' ,
547
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'a' , true ) ] ,
548
+ } ,
447
549
] . concat ( invalidTests ) . map ( parserOptionsMapper ) ,
448
550
} ) ;
0 commit comments