# jsx-a11y recommended

Accessibility checks for JSX: alt text, valid ARIA attributes, keyboard support and labelled form controls.

- Linter: ESLint
- Package: `eslint-plugin-jsx-a11y` (https://github.com/jsx-eslint/eslint-plugin-jsx-a11y#usage)
- Author: jsx-eslint (official)
- Rules: 31
- Weekly downloads: 65.1M, +42.0% last quarter
- Technologies: a11y (31)

## Install

```sh
npm install -D eslint eslint-plugin-jsx-a11y
pnpm add -D eslint eslint-plugin-jsx-a11y
yarn add -D eslint eslint-plugin-jsx-a11y
bun add -d eslint eslint-plugin-jsx-a11y
```

## Config: `eslint.config.js`

```js
// eslint.config.js
import jsxA11y from "eslint-plugin-jsx-a11y";

export default [
  jsxA11y.flatConfigs.recommended,
];
```

## Rules it enables

| Rule | Severity | Description | Reach |
| --- | --- | --- | --- |
| [jsx-a11y/alt-text](https://lintradar.dev/rules/jsx-a11y/alt-text.md) | error | Enforce all elements that require alternative text have meaningful information to relay back to end user. | 149.9M |
| [jsx-a11y/aria-props](https://lintradar.dev/rules/jsx-a11y/aria-props.md) | error | Enforce all `aria-*` props are valid. | 149.9M |
| [jsx-a11y/aria-proptypes](https://lintradar.dev/rules/jsx-a11y/aria-proptypes.md) | error | Enforce ARIA state and property values are valid. | 149.9M |
| [jsx-a11y/aria-unsupported-elements](https://lintradar.dev/rules/jsx-a11y/aria-unsupported-elements.md) | error | Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes. | 149.9M |
| [jsx-a11y/role-has-required-aria-props](https://lintradar.dev/rules/jsx-a11y/role-has-required-aria-props.md) | error | Enforce that elements with ARIA roles must have all required attributes for that role. | 149.9M |
| [jsx-a11y/role-supports-aria-props](https://lintradar.dev/rules/jsx-a11y/role-supports-aria-props.md) | error | Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. | 149.9M |
| [jsx-a11y/anchor-has-content](https://lintradar.dev/rules/jsx-a11y/anchor-has-content.md) | error | Enforce all anchors to contain accessible content. | 103.1M |
| [jsx-a11y/anchor-is-valid](https://lintradar.dev/rules/jsx-a11y/anchor-is-valid.md) | error | Enforce all anchors are valid, navigable elements. | 103.1M |
| [jsx-a11y/aria-activedescendant-has-tabindex](https://lintradar.dev/rules/jsx-a11y/aria-activedescendant-has-tabindex.md) | error | Enforce elements with aria-activedescendant are tabbable. | 103.1M |
| [jsx-a11y/aria-role](https://lintradar.dev/rules/jsx-a11y/aria-role.md) | error | Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role. | 103.1M |
| [jsx-a11y/heading-has-content](https://lintradar.dev/rules/jsx-a11y/heading-has-content.md) | error | Enforce heading (`h1`, `h2`, etc) elements contain accessible content. | 103.1M |
| [jsx-a11y/iframe-has-title](https://lintradar.dev/rules/jsx-a11y/iframe-has-title.md) | error | Enforce iframe elements have a title attribute. | 103.1M |
| [jsx-a11y/img-redundant-alt](https://lintradar.dev/rules/jsx-a11y/img-redundant-alt.md) | error | Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo". | 103.1M |
| [jsx-a11y/no-access-key](https://lintradar.dev/rules/jsx-a11y/no-access-key.md) | error | Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screen reader. | 103.1M |
| [jsx-a11y/no-distracting-elements](https://lintradar.dev/rules/jsx-a11y/no-distracting-elements.md) | error | Enforce distracting elements are not used. | 103.1M |
| [jsx-a11y/no-redundant-roles](https://lintradar.dev/rules/jsx-a11y/no-redundant-roles.md) | error | Enforce explicit role property is not the same as implicit/default role property on element. | 103.1M |
| [jsx-a11y/scope](https://lintradar.dev/rules/jsx-a11y/scope.md) | error | Enforce `scope` prop is only used on `<th>` elements. | 103.1M |
| [jsx-a11y/click-events-have-key-events](https://lintradar.dev/rules/jsx-a11y/click-events-have-key-events.md) | error | Enforce a clickable non-interactive element has at least one keyboard event listener. | 99M |
| [jsx-a11y/html-has-lang](https://lintradar.dev/rules/jsx-a11y/html-has-lang.md) | error | Enforce `<html>` element has `lang` prop. | 99M |
| [jsx-a11y/interactive-supports-focus](https://lintradar.dev/rules/jsx-a11y/interactive-supports-focus.md) | error | Enforce that elements with interactive handlers like `onClick` must be focusable. | 99M |
| [jsx-a11y/label-has-associated-control](https://lintradar.dev/rules/jsx-a11y/label-has-associated-control.md) | error | Enforce that a `label` tag has a text label and an associated control. | 99M |
| [jsx-a11y/media-has-caption](https://lintradar.dev/rules/jsx-a11y/media-has-caption.md) | error | Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions. | 99M |
| [jsx-a11y/mouse-events-have-key-events](https://lintradar.dev/rules/jsx-a11y/mouse-events-have-key-events.md) | error | Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users. | 99M |
| [jsx-a11y/no-interactive-element-to-noninteractive-role](https://lintradar.dev/rules/jsx-a11y/no-interactive-element-to-noninteractive-role.md) | error | Interactive elements should not be assigned non-interactive roles. | 99M |
| [jsx-a11y/no-noninteractive-element-to-interactive-role](https://lintradar.dev/rules/jsx-a11y/no-noninteractive-element-to-interactive-role.md) | error | Non-interactive elements should not be assigned interactive roles. | 99M |
| [jsx-a11y/no-noninteractive-tabindex](https://lintradar.dev/rules/jsx-a11y/no-noninteractive-tabindex.md) | error | `tabIndex` should only be declared on interactive elements. | 99M |
| [jsx-a11y/no-static-element-interactions](https://lintradar.dev/rules/jsx-a11y/no-static-element-interactions.md) | error | Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute. | 99M |
| [jsx-a11y/tabindex-no-positive](https://lintradar.dev/rules/jsx-a11y/tabindex-no-positive.md) | error | Enforce `tabIndex` value is not greater than zero. | 99M |
| [jsx-a11y/no-autofocus](https://lintradar.dev/rules/jsx-a11y/no-autofocus.md) | error | Enforce autoFocus prop is not used. | 97M |
| [jsx-a11y/autocomplete-valid](https://lintradar.dev/rules/jsx-a11y/autocomplete-valid.md) | error | Enforce that autocomplete attributes are used correctly. | 95.6M |
| [jsx-a11y/no-noninteractive-element-interactions](https://lintradar.dev/rules/jsx-a11y/no-noninteractive-element-interactions.md) | error | Non-interactive elements should not be assigned mouse or keyboard event listeners. | 70.5M |

---

Web page: https://lintradar.dev/presets/jsx-a11y-recommended. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
