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.
26 lines
755 B
26 lines
755 B
# no-access-key |
|
|
|
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 screenreaders and keyboard-only users create accessibility complications so to avoid complications, access keys should not be used. |
|
|
|
### References |
|
1. [WebAIM](https://webaim.org/techniques/keyboard/accesskey#spec) |
|
|
|
## Rule details |
|
|
|
This rule takes no arguments. |
|
|
|
### Succeed |
|
```jsx |
|
<div /> |
|
``` |
|
|
|
### Fail |
|
```jsx |
|
<div accessKey="h" /> |
|
``` |
|
|
|
## Accessibility guidelines |
|
General best practice (reference resources) |
|
|
|
### Resources |
|
- [WebAIM, Keyboard Accessibility: Accesskey](https://webaim.org/techniques/keyboard/accesskey#spec)
|
|
|