From 9a13c33d6b84f4521003ffafa2c98cba6c5662d1 Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:15:48 -0700 Subject: [PATCH] Make profiles keyboard accessible Co-Authored-By: Jason <84899178+jasonhenriquez@users.noreply.github.com> --- .eslintrc.js | 3 ++- .../ft-list-channel/ft-list-channel.vue | 2 ++ .../components/ft-list-video/ft-list-video.vue | 1 + .../ft-profile-bubble/ft-profile-bubble.js | 11 ++++++++++- .../ft-profile-bubble/ft-profile-bubble.vue | 9 ++++++++- .../ft-profile-channel-list.vue | 1 + .../ft-profile-edit/ft-profile-edit.vue | 4 ++++ .../ft-profile-filter-channels-list.vue | 1 + .../ft-profile-selector/ft-profile-selector.vue | 15 +++++++++++++++ src/renderer/views/Channel/Channel.vue | 8 ++++++++ .../views/Subscriptions/Subscriptions.vue | 3 +++ src/renderer/views/Trending/Trending.vue | 4 ++++ static/locales/en-US.yaml | 1 + 13 files changed, 60 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8cc33f62ab94a..2729411b7e10b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -47,7 +47,7 @@ module.exports = { 'plugin:vue/recommended', 'standard', 'plugin:jsonc/recommended-with-json', - // 'plugin:vuejs-accessibility/recommended' // uncomment once issues are fixed + 'plugin:vuejs-accessibility/recommended' ], // https://eslint.org/docs/user-guide/configuring#configuring-plugins @@ -70,6 +70,7 @@ module.exports = { some: ['nesting', 'id'] } }], + 'vuejs-accessibility/no-static-element-interactions': 'off', 'n/no-callback-literal': 'warn', 'n/no-path-concat': 'warn', 'unicorn/better-regex': 'error', diff --git a/src/renderer/components/ft-list-channel/ft-list-channel.vue b/src/renderer/components/ft-list-channel/ft-list-channel.vue index cfc85205005e1..cd034322cbae0 100644 --- a/src/renderer/components/ft-list-channel/ft-list-channel.vue +++ b/src/renderer/components/ft-list-channel/ft-list-channel.vue @@ -10,10 +10,12 @@
diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index a6a039d2ae8dd..e3a6303d5649f 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -22,6 +22,7 @@
0 ? Array.from(this.profileName)[0].toUpperCase() : '' } }, methods: { - goToProfile: function () { + goToProfile: function (event) { + if (event instanceof KeyboardEvent) { + if (event.target.getAttribute('role') === 'link' && event.key !== 'Enter') { + return + } + } this.$router.push({ path: `/settings/profile/edit/${this.profileId}` }) diff --git a/src/renderer/components/ft-profile-bubble/ft-profile-bubble.vue b/src/renderer/components/ft-profile-bubble/ft-profile-bubble.vue index 6879570dd057d..cfed977e68996 100644 --- a/src/renderer/components/ft-profile-bubble/ft-profile-bubble.vue +++ b/src/renderer/components/ft-profile-bubble/ft-profile-bubble.vue @@ -1,7 +1,11 @@