Static AST checker for accessibility rules on JSX elements
open sourceMITfree
eslint-plugin-jsx-a11y is an ESLint plugin that statically checks JSX for accessibility problems in React apps: missing alt text, invalid ARIA attributes and roles, click handlers on non-interactive elements without keyboard support, bad tabindex values and dozens more rules based on WAI-ARIA. It has recommended and strict shareable configs for both flat config (eslint.config.js) and legacy .eslintrc, and settings that map your own components and polymorphic props to the DOM elements they render, so custom components are checked too. Because it only sees static code, its maintainers suggest pairing it with a runtime checker such as axe-core.
Problems it solves
- catch accessibility mistakes in my React components before they ship
- lint JSX for missing alt text and invalid ARIA attributes
- enforce a11y rules in CI for a React codebase
Features
- accessibility lint rules for JSX based on WAI-ARIA
- recommended and strict shareable configs
- flat config and legacy .eslintrc support
- component and attribute mapping for custom components
- polymorphic component support
Limitations
- Only checks static code, so it misses problems that appear at runtime: its maintainers suggest pairing it with a runtime tool such as axe-core1
Alternatives
The same job
These do what eslint-plugin-jsx-a11y does.
- React Doctor Deterministic checks that catch the React mistakes coding agents make
- Stylelint A CSS linter that catches errors and enforces conventions in your stylesheets
- eslint-plugin-react React-specific linting rules for ESLint
- eslint-plugin-vue The official ESLint plugin for Vue.js
- ESLint Find and fix problems in your JavaScript code.
- Herb A modern templating language for the HTML+ERB you already have.
