From 6a383f13a6a59fd456c7aea368282137d0073bfc Mon Sep 17 00:00:00 2001 From: Trond Bergquist Date: Tue, 7 Sep 2021 12:58:23 +0200 Subject: [PATCH] eslint-config: set jsx-a11y/accessible-emoji to off From some testing on os x with VoiceOver, it seems the guidance provided in the rule jsx-a11y/accessible-emoji leads to a degraded experience with the label not being announced to the user. See [issue here](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/627) adeira-source-id: 62caa5f8212b2e108dbe5d57a44e0ad4aaae55f1 --- CHANGELOG.md | 1 + __tests__/__snapshots__/index.test.js.snap | 2 +- __tests__/__snapshots__/presets.test.js.snap | 2 +- src/presets/react.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 277db19..f2cfbda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased +- set `jsx-a11y/accessible-emoji` rule to off, since it is deprecated and creates a degraded experience: [see](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/627) - New rules `@next/next/inline-script-id`, `@next/next/no-script-in-document` and `@next/next/no-script-in-head` enabled (as warnings). For more information visit: https://nextjs.org/docs/basic-features/eslint#eslint-plugin - We clarified what to do when you are using `@adeira/eslint-config/next` preset inside monorepo (check our readme). Basically, you might encounter the following warning: diff --git a/__tests__/__snapshots__/index.test.js.snap b/__tests__/__snapshots__/index.test.js.snap index 0cd66da..cff564b 100644 --- a/__tests__/__snapshots__/index.test.js.snap +++ b/__tests__/__snapshots__/index.test.js.snap @@ -366,7 +366,7 @@ Object { "jest/valid-expect": 2, "jest/valid-expect-in-promise": 2, "jest/valid-title": 2, - "jsx-a11y/accessible-emoji": 2, + "jsx-a11y/accessible-emoji": 0, "jsx-a11y/alt-text": 2, "jsx-a11y/anchor-has-content": 2, "jsx-a11y/anchor-is-valid": 2, diff --git a/__tests__/__snapshots__/presets.test.js.snap b/__tests__/__snapshots__/presets.test.js.snap index 65a1a24..f391450 100644 --- a/__tests__/__snapshots__/presets.test.js.snap +++ b/__tests__/__snapshots__/presets.test.js.snap @@ -800,7 +800,7 @@ Object { 2, "all", ], - "jsx-a11y/accessible-emoji": 2, + "jsx-a11y/accessible-emoji": 0, "jsx-a11y/alt-text": 2, "jsx-a11y/anchor-has-content": 2, "jsx-a11y/anchor-is-valid": 2, diff --git a/src/presets/react.js b/src/presets/react.js index da18414..eb7a818 100644 --- a/src/presets/react.js +++ b/src/presets/react.js @@ -176,7 +176,7 @@ module.exports = ({ 'react-native/split-platform-components': OFF, // React Accessibility (https://github.com/evcohen/eslint-plugin-jsx-a11y) - 'jsx-a11y/accessible-emoji': ERROR, + 'jsx-a11y/accessible-emoji': OFF, 'jsx-a11y/alt-text': ERROR, 'jsx-a11y/anchor-has-content': ERROR, 'jsx-a11y/anchor-is-valid': ERROR,