@@ -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,14 +289,12 @@ 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 />' } ,
316
300
{ code : '<input type="checkbox" aria-controls />' } ,
@@ -319,7 +303,6 @@ ruleTester.run('role-supports-aria-props', rule, {
319
303
{ code : '<input type="checkbox" aria-dropeffect />' } ,
320
304
{ code : '<input type="checkbox" aria-flowto />' } ,
321
305
{ code : '<input type="checkbox" aria-grabbed />' } ,
322
- { code : '<input type="checkbox" aria-haspopup />' } ,
323
306
{ code : '<input type="checkbox" aria-hidden />' } ,
324
307
{ code : '<input type="checkbox" aria-invalid />' } ,
325
308
{ code : '<input type="checkbox" aria-label />' } ,
@@ -328,7 +311,6 @@ ruleTester.run('role-supports-aria-props', rule, {
328
311
{ code : '<input type="checkbox" aria-owns />' } ,
329
312
{ code : '<input type="checkbox" aria-relevant />' } ,
330
313
// when `type="radio"`, the implicit role is `radio`
331
- { code : '<input type="radio" aria-checked />' } ,
332
314
{ code : '<input type="radio" aria-atomic />' } ,
333
315
{ code : '<input type="radio" aria-busy />' } ,
334
316
{ code : '<input type="radio" aria-controls />' } ,
@@ -337,16 +319,13 @@ ruleTester.run('role-supports-aria-props', rule, {
337
319
{ code : '<input type="radio" aria-dropeffect />' } ,
338
320
{ code : '<input type="radio" aria-flowto />' } ,
339
321
{ code : '<input type="radio" aria-grabbed />' } ,
340
- { code : '<input type="radio" aria-haspopup />' } ,
341
322
{ code : '<input type="radio" aria-hidden />' } ,
342
- { code : '<input type="radio" aria-invalid />' } ,
343
323
{ code : '<input type="radio" aria-label />' } ,
344
324
{ code : '<input type="radio" aria-labelledby />' } ,
345
325
{ code : '<input type="radio" aria-live />' } ,
346
326
{ code : '<input type="radio" aria-owns />' } ,
347
327
{ code : '<input type="radio" aria-relevant />' } ,
348
328
{ code : '<input type="radio" aria-posinset />' } ,
349
- { code : '<input type="radio" aria-selected />' } ,
350
329
{ code : '<input type="radio" aria-setsize />' } ,
351
330
// when `type="range"`, the implicit role is `slider`
352
331
{ code : '<input type="range" aria-valuemax />' } ,
@@ -384,14 +363,7 @@ ruleTester.run('role-supports-aria-props', rule, {
384
363
{ code : '<h2 role="presentation" aria-level={undefined} />' } ,
385
364
386
365
// OTHER TESTS
387
- { code : '<aside aria-expanded />' } ,
388
- { code : '<article aria-expanded />' } ,
389
- { code : '<body aria-expanded />' } ,
390
366
{ 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
367
{ code : '<form aria-hidden />' } ,
396
368
{ code : '<h1 aria-hidden />' } ,
397
369
{ code : '<h2 aria-hidden />' } ,
@@ -401,20 +373,12 @@ ruleTester.run('role-supports-aria-props', rule, {
401
373
{ code : '<h6 aria-hidden />' } ,
402
374
{ code : '<hr aria-hidden />' } ,
403
375
{ code : '<li aria-current />' } ,
404
- { code : '<li aria-expanded />' } ,
405
376
{ code : '<meter aria-atomic />' } ,
406
- { code : '<nav aria-expanded />' } ,
407
- { code : '<ol aria-expanded />' } ,
408
377
{ code : '<option aria-atomic />' } ,
409
- { code : '<output aria-expanded />' } ,
410
378
{ code : '<progress aria-atomic />' } ,
411
- { code : '<section aria-expanded />' } ,
412
- { code : '<select aria-expanded />' } ,
413
- { code : '<tbody aria-expanded />' } ,
414
379
{ code : '<textarea aria-hidden />' } ,
415
- { code : '<tfoot aria-expanded />' } ,
416
- { code : '<thead aria-expanded />' } ,
417
- { code : '<ul aria-expanded />' } ,
380
+ { code : '<select aria-expanded />' , } ,
381
+ { code : '<datalist aria-expanded />' , } ,
418
382
419
383
] . concat ( validTests ) . map ( parserOptionsMapper ) ,
420
384
@@ -444,5 +408,149 @@ ruleTester.run('role-supports-aria-props', rule, {
444
408
code : '<aside aria-checked />' ,
445
409
errors : [ errorMessage ( 'aria-checked' , 'complementary' , 'aside' , true ) ] ,
446
410
} ,
411
+ {
412
+ code : '<ul aria-expanded />' ,
413
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'ul' , true ) ] ,
414
+ } ,
415
+ {
416
+ code : '<details aria-expanded />' ,
417
+ errors : [ errorMessage ( 'aria-expanded' , 'group' , 'details' , true ) ] ,
418
+ } ,
419
+ {
420
+ code : '<dialog aria-expanded />' ,
421
+ errors : [ errorMessage ( 'aria-expanded' , 'dialog' , 'dialog' , true ) ] ,
422
+ } ,
423
+ {
424
+ code : '<dl aria-expanded />' ,
425
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'dl' , true ) ] ,
426
+ } ,
427
+ {
428
+ code : '<aside aria-expanded />' ,
429
+ errors : [ errorMessage ( 'aria-expanded' , 'complementary' , 'aside' , true ) ] ,
430
+ } ,
431
+ {
432
+ code : '<article aria-expanded />' ,
433
+ errors : [ errorMessage ( 'aria-expanded' , 'article' , 'article' , true ) ] ,
434
+ } ,
435
+ {
436
+ code : '<body aria-expanded />' ,
437
+ errors : [ errorMessage ( 'aria-expanded' , 'document' , 'body' , true ) ] ,
438
+ } ,
439
+ {
440
+ code : '<li aria-expanded />' ,
441
+ errors : [ errorMessage ( 'aria-expanded' , 'listitem' , 'li' , true ) ] ,
442
+ } ,
443
+ {
444
+ code : '<nav aria-expanded />' ,
445
+ errors : [ errorMessage ( 'aria-expanded' , 'navigation' , 'nav' , true ) ] ,
446
+ } ,
447
+ {
448
+ code : '<ol aria-expanded />' ,
449
+ errors : [ errorMessage ( 'aria-expanded' , 'list' , 'ol' , true ) ] ,
450
+ } ,
451
+ {
452
+ code : '<output aria-expanded />' ,
453
+ errors : [ errorMessage ( 'aria-expanded' , 'status' , 'output' , true ) ] ,
454
+ } ,
455
+ {
456
+ code : '<section aria-expanded />' ,
457
+ errors : [ errorMessage ( 'aria-expanded' , 'region' , 'section' , true ) ] ,
458
+ } ,
459
+ {
460
+ code : '<tbody aria-expanded />' ,
461
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'tbody' , true ) ] ,
462
+ } ,
463
+ {
464
+ code : '<tfoot aria-expanded />' ,
465
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'tfoot' , true ) ] ,
466
+ } ,
467
+ {
468
+ code : '<thead aria-expanded />' ,
469
+ errors : [ errorMessage ( 'aria-expanded' , 'rowgroup' , 'thead' , true ) ] ,
470
+ } ,
471
+ {
472
+ code : '<input type="radio" aria-invalid />' ,
473
+ errors : [ errorMessage ( 'aria-invalid' , 'radio' , 'input' , true ) ] ,
474
+ } ,
475
+ {
476
+ code : '<input type="radio" aria-selected />' ,
477
+ errors : [ errorMessage ( 'aria-selected' , 'radio' , 'input' , true ) ] ,
478
+ } ,
479
+ {
480
+ code : '<input type="radio" aria-checked />' ,
481
+ errors : [ errorMessage ( 'aria-checked' , 'radio' , 'input' , true ) ] ,
482
+ } ,
483
+ {
484
+ code : '<input type="radio" aria-haspopup />' ,
485
+ errors : [ errorMessage ( 'aria-haspopup' , 'radio' , 'input' , true ) ] ,
486
+ } ,
487
+ {
488
+ code : '<input type="checkbox" aria-haspopup />' ,
489
+ errors : [ errorMessage ( 'aria-haspopup' , 'checkbox' , 'input' , true ) ] ,
490
+ } ,
491
+ {
492
+ code : '<input type="checkbox" aria-checked />' ,
493
+ errors : [ errorMessage ( 'aria-checked' , 'checkbox' , 'input' , true ) ] ,
494
+ } ,
495
+ {
496
+ code : '<input type="reset" aria-invalid />' ,
497
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
498
+ } ,
499
+ {
500
+ code : '<input type="submit" aria-invalid />' ,
501
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
502
+ } ,
503
+ {
504
+ code : '<input type="image" aria-invalid />' ,
505
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
506
+ } ,
507
+ {
508
+ code : '<input type="button" aria-invalid />' ,
509
+ errors : [ errorMessage ( 'aria-invalid' , 'button' , 'input' , true ) ] ,
510
+ } ,
511
+ {
512
+ code : '<menuitem type="command" aria-invalid />' ,
513
+ errors : [ errorMessage ( 'aria-invalid' , 'menuitem' , 'menuitem' , true ) ] ,
514
+ } ,
515
+ {
516
+ code : '<menuitem type="radio" aria-selected />' ,
517
+ errors : [ errorMessage ( 'aria-selected' , 'menuitemradio' , 'menuitem' , true ) ] ,
518
+ } ,
519
+ {
520
+ code : '<menu type="toolbar" aria-haspopup />' ,
521
+ errors : [ errorMessage ( 'aria-haspopup' , 'toolbar' , 'menu' , true ) ] ,
522
+ } ,
523
+ {
524
+ code : '<menu type="toolbar" aria-invalid />' ,
525
+ errors : [ errorMessage ( 'aria-invalid' , 'toolbar' , 'menu' , true ) ] ,
526
+ } ,
527
+ {
528
+ code : '<menu type="toolbar" aria-expanded />' ,
529
+ errors : [ errorMessage ( 'aria-expanded' , 'toolbar' , 'menu' , true ) ] ,
530
+ } ,
531
+ {
532
+ code : '<link href="#" aria-invalid />' ,
533
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'link' , true ) ] ,
534
+ } ,
535
+ {
536
+ code : '<link href="#" aria-haspopup />' ,
537
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'link' , true ) ] ,
538
+ } ,
539
+ {
540
+ code : '<area href="#" aria-invalid />' ,
541
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'area' , true ) ] ,
542
+ } ,
543
+ {
544
+ code : '<area href="#" aria-haspopup />' ,
545
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'area' , true ) ] ,
546
+ } ,
547
+ {
548
+ code : '<a href="#" aria-haspopup />' ,
549
+ errors : [ errorMessage ( 'aria-haspopup' , 'link' , 'a' , true ) ] ,
550
+ } ,
551
+ {
552
+ code : '<a href="#" aria-invalid />' ,
553
+ errors : [ errorMessage ( 'aria-invalid' , 'link' , 'a' , true ) ] ,
554
+ } ,
447
555
] . concat ( invalidTests ) . map ( parserOptionsMapper ) ,
448
556
} ) ;
0 commit comments