From 952af253fc5bd5ec83067f909c49dc72667b2654 Mon Sep 17 00:00:00 2001 From: Brad Adams Date: Thu, 17 Jun 2021 00:13:21 +0200 Subject: [PATCH] [Fix] `no-access-key`: Fix wording and grammar Fixes #801. --- __tests__/src/rules/no-access-key-test.js | 2 +- docs/rules/no-access-key.md | 2 +- src/rules/no-access-key.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__tests__/src/rules/no-access-key-test.js b/__tests__/src/rules/no-access-key-test.js index ea2ee66b9..32f035b21 100644 --- a/__tests__/src/rules/no-access-key-test.js +++ b/__tests__/src/rules/no-access-key-test.js @@ -19,7 +19,7 @@ import rule from '../../../src/rules/no-access-key'; const ruleTester = new RuleTester(); const expectedError = { - message: 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard comments used by screenreader and keyboard only users create a11y complications.', + message: 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create a11y complications.', type: 'JSXOpeningElement', }; diff --git a/docs/rules/no-access-key.md b/docs/rules/no-access-key.md index b3c18500f..80ddc98cb 100644 --- a/docs/rules/no-access-key.md +++ b/docs/rules/no-access-key.md @@ -1,6 +1,6 @@ # no-access-key -Enforce no accessKey prop on element. Access keys are HTML attributes that allow web developers to assign keyboard shortcuts to elements. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreader and keyboard only users create accessibility complications so to avoid complications, access keys should not be used. +Enforce no accessKey prop on element. Access keys are HTML attributes that allow web developers to assign keyboard shortcuts to elements. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create accessibility complications so to avoid complications, access keys should not be used. ### References 1. [WebAIM](http://webaim.org/techniques/keyboard/accesskey#spec) diff --git a/src/rules/no-access-key.js b/src/rules/no-access-key.js index 854c11382..ac089cc75 100644 --- a/src/rules/no-access-key.js +++ b/src/rules/no-access-key.js @@ -10,7 +10,7 @@ import { getProp, getPropValue } from 'jsx-ast-utils'; import { generateObjSchema } from '../util/schemas'; -const errorMessage = 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard comments used by screenreader and keyboard only users create a11y complications.'; +const errorMessage = 'No access key attribute allowed. Inconsistencies between keyboard shortcuts and keyboard commands used by screenreaders and keyboard-only users create a11y complications.'; const schema = generateObjSchema();