# jsx-a11y/no-access-key

> Disallow the `accessKey` attribute

`accessKey` adds a keyboard shortcut to an element. Screen readers and browsers already use many key combinations, and they differ from one to the next, so your shortcut can take over a command that a keyboard user depends on.

The attribute is reported on any element or component, no matter how it's capitalized.

`--fix-suggestions` removes the attribute.

{/* Generated by src/codegen/lint-rule-docs.ts. Do not edit this section. */}

## Configure

Off by default. To turn it on:

```toml bunfig.toml
[lint.rules]
"jsx-a11y/no-access-key" = "error" # or "warn"
```

{/* End of the generated section. */}

## Examples

Reported:

{/* bad {"count": 2} */}
```jsx
const save = <button accessKey="s">Save</button>;
const open = <MenuItem accesskey="o" />;
```

Not reported:

{/* good */}
```jsx
const save = <button>Save</button>;
const open = <MenuItem />;
```
