diff --git a/client/.eslintrc.json b/client/.eslintrc.json index 5f85ab1cfa8..5df4f328d4a 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -3,8 +3,8 @@ "extends": [ "eslint:recommended", "plugin:vue/recommended", - "plugin:compat/recommended" - //"airbnb-base", eventually (?) + "plugin:compat/recommended", + "plugin:vuejs-accessibility/recommended" ], "env": { "browser": true, @@ -41,7 +41,19 @@ "vue/singleline-html-element-content-newline": "off", "vue/multiline-html-element-content-newline": "off", "vue/html-closing-bracket-newline": "off", - "vue/html-closing-bracket-spacing": "off" + "vue/html-closing-bracket-spacing": "off", + + // Accessibility rules + "vuejs-accessibility/alt-text": "error", + "vuejs-accessibility/anchor-has-content": "warn", + "vuejs-accessibility/click-events-have-key-events": "warn", + "vuejs-accessibility/form-control-has-label": "warn", + "vuejs-accessibility/heading-has-content": "error", + "vuejs-accessibility/iframe-has-title": "error", + "vuejs-accessibility/label-has-for": "warn", + "vuejs-accessibility/mouse-events-have-key-events": "warn", + "vuejs-accessibility/no-autofocus": "error", + "vuejs-accessibility/tabindex-no-positive": "error" }, "ignorePatterns": ["src/qunit", "src/mocha", "src/libs", "src/nls", "src/legacy"] } diff --git a/client/package.json b/client/package.json index 0352d66a6b7..df59e80642a 100644 --- a/client/package.json +++ b/client/package.json @@ -148,6 +148,7 @@ "eslint": "^8.20.0", "eslint-plugin-compat": "^4.0.2", "eslint-plugin-vue": "^9.3.0", + "eslint-plugin-vuejs-accessibility": "^1.2.0", "expose-loader": "^4.0.0", "gulp": "^4.0.2", "ignore-loader": "^0.1.2", diff --git a/client/src/components/ClickToEdit.vue b/client/src/components/ClickToEdit.vue index 04f1ea3cfb6..44a3cdf67cc 100644 --- a/client/src/components/ClickToEdit.vue +++ b/client/src/components/ClickToEdit.vue @@ -17,7 +17,6 @@