Add jsx-a11y eslint plugin (#7434)
* add matrix-org a11y eslint plgin Signed-off-by: Kerry Archibald <kerrya@element.io> * add eslint a11y, enable and fix anchor-has-content rule Signed-off-by: Kerry Archibald <kerrya@element.io> * enable and fix jsx-a11y/no-redundant-roles Signed-off-by: Kerry Archibald <kerrya@element.io> * remove debug Signed-off-by: Kerry Archibald <kerrya@element.io> * i18n Signed-off-by: Kerry Archibald <kerrya@element.io> * use jsx-a11y via matrix-org-eslint Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
03f5a3c3e6
commit
846fbfa2a0
8 changed files with 122 additions and 12 deletions
25
.eslintrc.js
25
.eslintrc.js
|
@ -1,8 +1,11 @@
|
|||
module.exports = {
|
||||
plugins: ["matrix-org"],
|
||||
plugins: [
|
||||
"matrix-org",
|
||||
],
|
||||
extends: [
|
||||
"plugin:matrix-org/babel",
|
||||
"plugin:matrix-org/react",
|
||||
"plugin:matrix-org/a11y",
|
||||
],
|
||||
env: {
|
||||
browser: true,
|
||||
|
@ -36,6 +39,26 @@ module.exports = {
|
|||
"Use Media helper instead to centralise access for customisation.",
|
||||
),
|
||||
],
|
||||
|
||||
// There are too many a11y violations to fix at once
|
||||
// Turn violated rules off until they are fixed
|
||||
"jsx-a11y/alt-text": "off",
|
||||
"jsx-a11y/anchor-is-valid": "off",
|
||||
"jsx-a11y/aria-activedescendant-has-tabindex": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/iframe-has-title": "off",
|
||||
"jsx-a11y/interactive-supports-focus": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/media-has-caption": "off",
|
||||
"jsx-a11y/mouse-events-have-key-events": "off",
|
||||
"jsx-a11y/no-autofocus": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off",
|
||||
"jsx-a11y/no-noninteractive-tabindex": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off",
|
||||
"jsx-a11y/role-has-required-aria-props": "off",
|
||||
"jsx-a11y/role-supports-aria-props": "off",
|
||||
"jsx-a11y/tabindex-no-positive": "off",
|
||||
},
|
||||
overrides: [{
|
||||
files: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue