From ccc2c3859c3fe23b2359402c8eb945ea74f3f193 Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:54:36 -0500 Subject: [PATCH 1/4] Bump eslint-plugin-jsx-a11y to 6.7.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6811a54..212ec4b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-i18n-text": "^1.0.1", "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.6.0", + "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-no-only-tests": "^3.0.0", "eslint-plugin-prettier": "^4.0.0", "eslint-rule-documentation": ">=1.0.0", diff --git a/package.json b/package.json index bd66b253..bfd64217 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-plugin-filenames": "^1.3.2", "eslint-plugin-i18n-text": "^1.0.1", "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.6.0", + "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-no-only-tests": "^3.0.0", "eslint-plugin-prettier": "^4.0.0", "eslint-rule-documentation": ">=1.0.0", From 7556b0b36142d22f265fb64a6dfecd2dcb27f18c Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Fri, 3 Feb 2023 09:59:37 -0500 Subject: [PATCH 2/4] mark existing rule as deprecated --- README.md | 5 ++++- docs/rules/a11y-no-generic-link-text.md | 4 +++- lib/configs/react.js | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index efed8c9d..b8bbe24b 100644 --- a/README.md +++ b/README.md @@ -93,5 +93,8 @@ This config will be interpreted in the following way: #### Accessibility-focused rules (prefixed with a11y) -- [No Generic Link Text](./docs/rules/a11y-no-generic-link-text.md) - [Role Supports ARIA Props](./docs/rules/role-supports-aria-props.md) + +##### Deprecated + +- [No Generic Link Text](./docs/rules/a11y-no-generic-link-text.md) \ No newline at end of file diff --git a/docs/rules/a11y-no-generic-link-text.md b/docs/rules/a11y-no-generic-link-text.md index dde15212..a051d61c 100644 --- a/docs/rules/a11y-no-generic-link-text.md +++ b/docs/rules/a11y-no-generic-link-text.md @@ -1,4 +1,6 @@ -# No Generic Link Text +# No Generic Link Text [Deprecated] + +_This rule has been deprecated in favor of `anchor-ambiguous-text` in `eslint-plugin-jsx-a11y`._ ## Rule Details diff --git a/lib/configs/react.js b/lib/configs/react.js index 8cd93ad1..7a891a41 100644 --- a/lib/configs/react.js +++ b/lib/configs/react.js @@ -8,7 +8,7 @@ module.exports = { plugins: ['github', 'jsx-a11y'], extends: ['plugin:jsx-a11y/recommended'], rules: { - 'github/a11y-no-generic-link-text': 'error', + 'github/a11y-no-generic-link-text': 'off', 'github/role-supports-aria-props': 'error', 'jsx-a11y/role-supports-aria-props': 'off', }, From 3a1b6dfde62c415858d457bb2da0891b94c71c63 Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:32:58 -0500 Subject: [PATCH 3/4] update react.js config --- lib/configs/react.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/configs/react.js b/lib/configs/react.js index 7a891a41..a49ead99 100644 --- a/lib/configs/react.js +++ b/lib/configs/react.js @@ -8,8 +8,14 @@ module.exports = { plugins: ['github', 'jsx-a11y'], extends: ['plugin:jsx-a11y/recommended'], rules: { - 'github/a11y-no-generic-link-text': 'off', + 'jsx-a11y/role-supports-aria-props': 'off', // Override with github/role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved 'github/role-supports-aria-props': 'error', - 'jsx-a11y/role-supports-aria-props': 'off', + 'jsx-a11y/no-aria-hidden-on-focusable': 'error', + 'jsx-a11y/anchor-ambiguous-text': [ + 'error', + { + words: ['this', 'more', 'read here', 'read more'], + }, + ], }, } From 019e11e2e67158b2f4fd57fb0167da618cf81f42 Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Fri, 3 Feb 2023 10:37:39 -0500 Subject: [PATCH 4/4] remove deprecated from README --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index b8bbe24b..46a6b861 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,3 @@ This config will be interpreted in the following way: #### Accessibility-focused rules (prefixed with a11y) - [Role Supports ARIA Props](./docs/rules/role-supports-aria-props.md) - -##### Deprecated - -- [No Generic Link Text](./docs/rules/a11y-no-generic-link-text.md) \ No newline at end of file