O with occluded right edge to appear also as a C Open Web Components Guides Docs Blog

Linting >> EsLint Plugin Lit A11y >> no-access-key

Enforce no accesskey attribute 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.

Rule Details

This rule takes no arguments.

Examples of incorrect code for this rule:

html` <a accesskey="j"></a> `;
html` <a accesskey="${foo}"></a> `;
html` <a accesskey="${'f'}"></a> `;

Examples of correct code for this rule:

html` <div></div> `;

Further Reading