Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

no-access-key.md 564 B

3 år sedan
1234567891011121314151617181920
  1. # no-access-key
  2. Enforce no accessKey prop on element. Access keys are HTML attributes that allow web developers to assign keyboard shortcuts to elements. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreader and keyboard only users create accessibility complications so to avoid complications, access keys should not be used.
  3. ### References
  4. 1. [WebAIM](http://webaim.org/techniques/keyboard/accesskey#spec)
  5. ## Rule details
  6. This rule takes no arguments.
  7. ### Succeed
  8. ```jsx
  9. <div />
  10. ```
  11. ### Fail
  12. ```jsx
  13. <div accessKey="h" />
  14. ```