source: frontend/node_modules/eslint-plugin-jsx-a11y/docs/rules/tabindex-no-positive.md

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 849 bytes
Line 
1# jsx-a11y/tabindex-no-positive
2
3💼 This rule is enabled in the following configs: ☑️ `recommended`, 🔒 `strict`.
4
5<!-- end auto-generated rule header -->
6
7Avoid positive `tabIndex` property values to synchronize the flow of the page with keyboard tab order.
8
9## Rule details
10
11This rule takes no arguments.
12
13### Succeed
14```jsx
15<span tabIndex="0">foo</span>
16<span tabIndex="-1">bar</span>
17<span tabIndex={0}>baz</span>
18```
19
20### Fail
21```jsx
22<span tabIndex="5">foo</span>
23<span tabIndex="3">bar</span>
24<span tabIndex="1">baz</span>
25<span tabIndex="2">never really sure what goes after baz</span>
26```
27
28## Accessibility guidelines
29- [WCAG 2.4.3](https://www.w3.org/WAI/WCAG21/Understanding/focus-order)
30
31### Resources
32- [Chrome Audit Rules, AX_FOCUS_03](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_focus_03)
Note: See TracBrowser for help on using the repository browser.