From 38d52f856a18d444e6db7d16d373e0d18c5b287d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 7 Aug 2022 17:00:44 -0400 Subject: [PATCH] [Fix] expose `prefer-tag-over-role` --- README.md | 2 ++ src/index.js | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 66f817238..69af04c6c 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ configuration file by mapping each custom component name to a DOM element type. - [no-onchange](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md): Enforce usage of `onBlur` over `onChange` on select menus for accessibility. - [no-redundant-roles](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md): Enforce explicit role property is not the same as implicit/default role property on element. - [no-static-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md): Enforce that non-interactive, visible elements (such as `
`) that have click handlers use the role attribute. + - [role-has-required-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md): Enforce that elements with ARIA roles must have all required attributes for that role. - [role-supports-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md): Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`. - [scope](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md): Enforce `scope` prop is only used on `` elements. @@ -187,6 +188,7 @@ configuration file by mapping each custom component name to a DOM element type. | [no-onchange](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md) | off | off | | [no-redundant-roles](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md) | error | error | | [no-static-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md) | error, with options | error | +| [prefer-tag-over-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md) | off | off | | [role-has-required-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md) | error | error | | [role-supports-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md) | error | error | | [scope](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md) | error, with options | error | diff --git a/src/index.js b/src/index.js index ae4b56697..8020f1255 100644 --- a/src/index.js +++ b/src/index.js @@ -35,6 +35,7 @@ module.exports = { 'no-onchange': require('./rules/no-onchange'), 'no-redundant-roles': require('./rules/no-redundant-roles'), 'no-static-element-interactions': require('./rules/no-static-element-interactions'), + 'prefer-tag-over-role': require('./rules/prefer-tag-over-role'), 'role-has-required-aria-props': require('./rules/role-has-required-aria-props'), 'role-supports-aria-props': require('./rules/role-supports-aria-props'), scope: require('./rules/scope'),