@jsxtools/eslint-plugin-jsx-a11y
Version:
Static AST checker for accessibility rules on JSX elements for flat ESLint Config.
14 lines (11 loc) • 342 B
JavaScript
const jsxAstUtils = require('./module/jsx-ast-utils.cjs');
const presentationRoles = /* @__PURE__ */ new Set([
"presentation",
"none"
]);
const isPresentationRole = (tagName, attributes) => presentationRoles.has(
jsxAstUtils.getLiteralPropValue(
jsxAstUtils.getProp(attributes, "role")
)
);
module.exports = isPresentationRole;