@@ -18,7 +18,7 @@ import rule from '../../../src/rules/aria-activedescendant-has-tabindex';
18
18
const ruleTester = new RuleTester ( ) ;
19
19
20
20
const expectedError = {
21
- message : 'An element that manages focus with `aria-activedescendant` must be tabbable ' ,
21
+ message : 'An element that manages focus with `aria-activedescendant` must have a tabindex ' ,
22
22
type : 'JSXOpeningElement' ,
23
23
} ;
24
24
@@ -57,25 +57,28 @@ ruleTester.run('aria-activedescendant-has-tabindex', rule, {
57
57
{
58
58
code : '<input aria-activedescendant={someID} />;' ,
59
59
} ,
60
+ {
61
+ code : '<input aria-activedescendant={someID} tabIndex={1} />;' ,
62
+ } ,
60
63
{
61
64
code : '<input aria-activedescendant={someID} tabIndex={0} />;' ,
62
65
} ,
63
- ] . map ( parserOptionsMapper ) ,
64
- invalid : [
65
66
{
66
- code : '<div aria-activedescendant={someID} />;' ,
67
- errors : [ expectedError ] ,
67
+ code : '<input aria-activedescendant={someID} tabIndex={-1} />;' ,
68
68
} ,
69
69
{
70
70
code : '<div aria-activedescendant={someID} tabIndex={-1} />;' ,
71
- errors : [ expectedError ] ,
72
71
} ,
73
72
{
74
73
code : '<div aria-activedescendant={someID} tabIndex="-1" />;' ,
75
- errors : [ expectedError ] ,
76
74
} ,
77
75
{
78
76
code : '<input aria-activedescendant={someID} tabIndex={-1} />;' ,
77
+ } ,
78
+ ] . map ( parserOptionsMapper ) ,
79
+ invalid : [
80
+ {
81
+ code : '<div aria-activedescendant={someID} />;' ,
79
82
errors : [ expectedError ] ,
80
83
} ,
81
84
] . map ( parserOptionsMapper ) ,
0 commit comments