jsx-a11y/accessible-emoji
eslint-plugin-jsx-a11y
import jsxA11y from "eslint-plugin-jsx-a11y";
export default [
{
plugins: { "jsx-a11y": jsxA11y },
rules: {
"jsx-a11y/accessible-emoji": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Enforce emojis are wrapped in <span> and provide screen reader access.
<span>🐼</span>
<i role="img" aria-label="Panda">🐼</i><span role="img" aria-label="Snowman">☃</span>
<span role="img" aria-label="Panda">🐼</span>
<span role="img" aria-labelledby="panda1">🐼</span>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/accessible-emoji
eslint-plugin-jsx-a11y
import jsxA11y from "eslint-plugin-jsx-a11y";
export default [
{
plugins: { "jsx-a11y": jsxA11y },
rules: {
"jsx-a11y/accessible-emoji": "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.