jsx-a11y/no-onchange
eslint-plugin-jsx-a11y
import jsxA11y from "eslint-plugin-jsx-a11y";
export default [
{
plugins: { "jsx-a11y": jsxA11y },
rules: {
"jsx-a11y/no-onchange": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Enforce usage of onBlur over onChange on select menus for accessibility.
<select onChange={updateModel} /><select onBlur={updateModel}>
<option/>
</select>
<select>
<option onBlur={handleOnBlur} onChange={handleOnChange} />
</select>Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
jsx-a11y/no-onchange
eslint-plugin-jsx-a11y
import jsxA11y from "eslint-plugin-jsx-a11y";
export default [
{
plugins: { "jsx-a11y": jsxA11y },
rules: {
"jsx-a11y/no-onchange": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce that a control (an interactive element) has a text label.
Enforces using semantic DOM elements over the ARIA role property.
Disallow aria-hidden="true" from being set on focusable elements.
Enforce <a> text to not exactly match "click here", "here", "link", or "a link".
Non-interactive elements should not be assigned mouse or keyboard event listeners.