You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tabindex-no-positive.md 590 B

преди 3 години
1234567891011121314151617181920212223242526
  1. # tabindex-no-positive
  2. Avoid positive tabIndex property values to synchronize the flow of the page with keyboard tab order.
  3. #### References
  4. 1. [AX_FOCUS_03](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_focus_03)
  5. ## Rule details
  6. This rule takes no arguments.
  7. ### Succeed
  8. ```jsx
  9. <span tabIndex="0">foo</span>
  10. <span tabIndex="-1">bar</span>
  11. <span tabIndex={0}>baz</span>
  12. ```
  13. ### Fail
  14. ```jsx
  15. <span tabIndex="5">foo</span>
  16. <span tabIndex="3">bar</span>
  17. <span tabIndex="1">baz</span>
  18. <span tabIndex="2">never really sure what goes after baz</span>
  19. ```