Skip to content

Commit 7b3492b

Browse files
dummdidummljharb
authored andcommitted
[Docs] aria-activedescendant-has-tabindex: align with changes from jsx-eslint#708
Closes jsx-eslint#924
1 parent 64bfea6 commit 7b3492b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/rules/aria-activedescendant-has-tabindex.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ element will be applied as the value of `aria-activedescendant` on the input
1515
element.
1616

1717
Because an element with `aria-activedescendant` must be tabbable, it must either
18-
have an inherent `tabIndex` of zero or declare a `tabIndex` of zero with the `tabIndex`
19-
attribute.
18+
have an inherent `tabIndex` of zero or declare a `tabIndex` attribute.
2019

2120
## Rule details
2221

@@ -34,16 +33,16 @@ This rule takes no arguments.
3433
<div aria-activedescendant={someID} tabIndex={0} />
3534
<div aria-activedescendant={someID} tabIndex="0" />
3635
<div aria-activedescendant={someID} tabIndex={1} />
36+
<div aria-activedescendant={someID} tabIndex={-1} />
37+
<div aria-activedescendant={someID} tabIndex="-1" />
3738
<input aria-activedescendant={someID} />
3839
<input aria-activedescendant={someID} tabIndex={0} />
40+
<input aria-activedescendant={someID} tabIndex={-1} />
3941
```
4042

4143
### Fail
4244
```jsx
4345
<div aria-activedescendant={someID} />
44-
<div aria-activedescendant={someID} tabIndex={-1} />
45-
<div aria-activedescendant={someID} tabIndex="-1" />
46-
<input aria-activedescendant={someID} tabIndex={-1} />
4746
```
4847

4948
## Accessibility guidelines

0 commit comments

Comments
 (0)