From 0841bf3e88066321b8ef1f1ab70ca2b23d4436a3 Mon Sep 17 00:00:00 2001
From: onion chunky <78101139+ChunkyProgrammer@users.noreply.github.com>
Date: Tue, 11 Oct 2022 00:29:57 -0400
Subject: [PATCH 01/14] improve accessibility of FreeTube input elements
Co-Authored-By: Jason <84899178+jasonhenriquez@users.noreply.github.com>
---
.eslintrc.js | 11 ++++-
package.json | 1 +
src/renderer/App.vue | 10 +++--
.../ft-icon-button/ft-icon-button.js | 2 +
.../ft-icon-button/ft-icon-button.sass | 2 +-
.../ft-icon-button/ft-icon-button.vue | 13 +++++-
src/renderer/components/ft-input/ft-input.vue | 3 ++
.../ft-list-dropdown/ft-list-dropdown.css | 18 ++++----
.../ft-list-dropdown/ft-list-dropdown.js | 33 +++++++++++++-
.../ft-list-dropdown/ft-list-dropdown.vue | 17 +++++--
.../ft-notification-banner.css | 4 ++
.../ft-notification-banner.js | 3 +-
.../ft-notification-banner.vue | 11 ++++-
.../components/ft-prompt/ft-prompt.js | 12 ++++-
.../components/ft-prompt/ft-prompt.vue | 12 ++++-
.../components/ft-select/ft-select.css | 1 -
.../components/ft-select/ft-select.js | 5 ++-
.../components/ft-select/ft-select.vue | 3 ++
src/renderer/components/ft-toast/ft-toast.vue | 4 ++
src/renderer/helpers/accessibility.js | 44 +++++++++++++++++++
yarn.lock | 19 ++++++++
21 files changed, 200 insertions(+), 28 deletions(-)
create mode 100644 src/renderer/helpers/accessibility.js
diff --git a/.eslintrc.js b/.eslintrc.js
index d1af5515aa34b..b1cb4c2aa3944 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -26,10 +26,11 @@ module.exports = {
'eslint:recommended',
'plugin:vue/recommended',
'standard'
+ // 'plugin:vuejs-accessibility/recommended' // uncomment once issues are fixed
],
// https://eslint.org/docs/user-guide/configuring#configuring-plugins
- plugins: ['vue'],
+ plugins: ['vue', 'vuejs-accessibility'],
rules: {
'space-before-function-paren': 'off',
@@ -40,6 +41,12 @@ module.exports = {
'no-undef': 'warn',
'vue/no-template-key': 'warn',
'vue/no-useless-template-attributes': 'off',
- 'vue/multi-word-component-names': 'off'
+ 'vue/multi-word-component-names': 'off',
+ 'vuejs-accessibility/no-onchange': 'off',
+ 'vuejs-accessibility/label-has-for': ['error', {
+ required: {
+ some: ['nesting', 'id']
+ }
+ }]
}
}
diff --git a/package.json b/package.json
index 5f732171f7bb0..175ffa6fc1e53 100644
--- a/package.json
+++ b/package.json
@@ -56,6 +56,7 @@
"autolinker": "^4.0.0",
"browserify": "^17.0.0",
"electron-context-menu": "^3.5.0",
+ "eslint-plugin-vuejs-accessibility": "^1.2.0",
"http-proxy-agent": "^4.0.1",
"https-proxy-agent": "^5.0.0",
"lodash.debounce": "^4.0.8",
diff --git a/src/renderer/App.vue b/src/renderer/App.vue
index a1a3f925fb38c..b4d7faa4ef45d 100644
--- a/src/renderer/App.vue
+++ b/src/renderer/App.vue
@@ -20,12 +20,14 @@
v-if="showUpdatesBanner"
class="banner"
:message="updateBannerMessage"
+ role="link"
@click="handleUpdateBannerClick"
/>
- {{ changeLogTitle }}
-
+