Skip to content

noAccessKey (HTML)

biome.json
{
"linter": {
"rules": {
"a11y": {
"noAccessKey": "error"
}
}
}
}

Disallow the accesskey attribute.

accesskey assigns a keyboard shortcut to an element. The shortcut can conflict with browser, operating-system, or screen-reader commands, and the activation keys differ between browsers. Remove the attribute and provide keyboard access through standard interactive elements.

<input type="submit" accesskey="s" value="Submit" />
code-block.html:1:22 lint/a11y/noAccessKey  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Avoid the accesskey attribute to reduce inconsistencies between keyboard shortcuts and screen reader keyboard commands.

> 1 │ <input type="submit" accesskey="s" value="Submit" />
│ ^^^^^^^^^^^^^
2 │

ℹ Assigning keyboard shortcuts using the accesskey attribute leads to inconsistent keyboard actions across applications.

ℹ Unsafe fix: Remove the accesskey attribute.

1 │ <input·type="submit"·accesskey="s"·value="Submit"·/>
│ --------------
<a href="https://webaim.org/" accesskey="w">WebAIM.org</a>
code-block.html:1:31 lint/a11y/noAccessKey  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Avoid the accesskey attribute to reduce inconsistencies between keyboard shortcuts and screen reader keyboard commands.

> 1 │ <a href="https://webaim.org/" accesskey="w">WebAIM.org</a>
│ ^^^^^^^^^^^^^
2 │

ℹ Assigning keyboard shortcuts using the accesskey attribute leads to inconsistent keyboard actions across applications.

ℹ Unsafe fix: Remove the accesskey attribute.

1 │ <a·href="https://webaim.org/"·accesskey="w">WebAIM.org</a>
│ -------------
<button accesskey="n">Next</button>
code-block.html:1:9 lint/a11y/noAccessKey  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✖ Avoid the accesskey attribute to reduce inconsistencies between keyboard shortcuts and screen reader keyboard commands.

> 1 │ <button accesskey="n">Next</button>
│ ^^^^^^^^^^^^^
2 │

ℹ Assigning keyboard shortcuts using the accesskey attribute leads to inconsistent keyboard actions across applications.

ℹ Unsafe fix: Remove the accesskey attribute.

1 │ <button·accesskey="n">Next</button>
│ -------------
<button>Next</button>