Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
<li onClick={() => void 0} />
<div onClick={() => void 0} role="listitem" /><div onClick={() => void 0} role="button" />
<div onClick={() => void 0} role="presentation" />
<input type="text" onClick={() => void 0} /> // Interactive element does not require role.
<button onClick={() => void 0} className="foo" /> // button is interactive.
<div onClick={() => void 0} role="button" aria-hidden /> // This is hidden from screen reader.
<Input onClick={() => void 0} type="hidden" /> // This is a higher-level DOM componentPopular · 1 of 50
Non-interactive elements should not be assigned mouse or keyboard event listeners.
<li onClick={() => void 0} />
<div onClick={() => void 0} role="listitem" /><div onClick={() => void 0} role="button" />
<div onClick={() => void 0} role="presentation" />
<input type="text" onClick={() => void 0} /> // Interactive element does not require role.
<button onClick={() => void 0} className="foo" /> // button is interactive.
<div onClick={() => void 0} role="button" aria-hidden /> // This is hidden from screen reader.
<Input onClick={() => void 0} type="hidden" /> // This is a higher-level DOM component