Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 896 Bytes

no-access-key.md

File metadata and controls

30 lines (20 loc) · 896 Bytes

jsx-a11y/no-access-key

💼 This rule is enabled in the following configs: ☑️ recommended, 🔒 strict.

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 screen readers and keyboard-only users create accessibility complications so to avoid complications, access keys should not be used.

References

  1. WebAIM

Rule details

This rule takes no arguments.

Succeed

<div />

Fail

<div accessKey="h" />

Accessibility guidelines

General best practice (reference resources)

Resources