Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 675 Bytes

no-access-key.md

File metadata and controls

30 lines (20 loc) · 675 Bytes

no-access-key

Enforce no accessKey prop on element. Access keys are HTML elements 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.

options

This rule takes no options

Passes

// passes when there is an no `accessKey` prop
<div></div>

Fails

// fails when there is an `accessKey` prop
<div accesskey="a"></div>

See also