UNPKG

@jsxtools/eslint-plugin-jsx-a11y

Version:

Static AST checker for accessibility rules on JSX elements for flat ESLint Config.

11 lines (8 loc) 240 B
const jsxAstUtils = require('../module/jsx-ast-utils.cjs'); function getImplicitRoleForAnchor(attributes) { if (jsxAstUtils.getProp(attributes, "href")) { return "link"; } return ""; } module.exports = getImplicitRoleForAnchor;