From 1cc5ed8871eb013f2344d816b095305b6d50caa5 Mon Sep 17 00:00:00 2001 From: Agate Date: Tue, 4 Aug 2020 13:22:31 +0200 Subject: [PATCH] Resolve "Ensure all buttons in the application are operable using only the keyboard" --- front/src/components/Queue.vue | 2 +- front/src/components/audio/PlayButton.vue | 17 ++-- front/src/components/audio/Player.vue | 99 +++++++++---------- front/src/components/audio/VolumeControl.vue | 4 +- .../src/components/common/AttachmentInput.vue | 8 +- .../src/components/common/DangerousButton.vue | 4 +- .../src/components/federation/FetchButton.vue | 7 +- front/src/components/forms/PasswordInput.vue | 4 +- .../src/components/library/AlbumDropdown.vue | 8 +- front/src/components/library/ArtistBase.vue | 14 +-- .../components/library/ImportStatusModal.vue | 4 +- front/src/components/library/TrackBase.vue | 8 +- .../src/components/library/radios/Filter.vue | 4 +- .../manage/moderation/InstancePolicyModal.vue | 4 +- .../notifications/NotificationRow.vue | 8 +- front/src/components/playlists/Editor.vue | 10 +- .../components/playlists/PlaylistModal.vue | 2 +- front/src/main.js | 7 ++ front/src/style/components/_play_button.scss | 5 + front/src/style/components/_player.scss | 11 ++- .../src/style/components/_volume_control.scss | 1 + front/src/views/admin/ChannelDetail.vue | 4 +- front/src/views/admin/library/AlbumDetail.vue | 4 +- .../src/views/admin/library/ArtistDetail.vue | 4 +- .../src/views/admin/library/LibraryDetail.vue | 4 +- front/src/views/admin/library/TagDetail.vue | 4 +- front/src/views/admin/library/TrackDetail.vue | 4 +- .../src/views/admin/library/UploadDetail.vue | 4 +- .../views/admin/moderation/AccountsDetail.vue | 4 +- front/src/views/auth/ProfileBase.vue | 4 +- front/src/views/auth/ProfileOverview.vue | 6 +- front/src/views/channels/DetailBase.vue | 16 +-- .../src/views/channels/SubscriptionsList.vue | 4 +- front/src/views/content/libraries/Home.vue | 2 +- front/src/views/content/remote/Card.vue | 19 +--- front/src/views/library/DetailBase.vue | 4 +- front/src/views/library/Edit.vue | 8 +- front/src/views/playlists/Detail.vue | 4 +- 38 files changed, 167 insertions(+), 163 deletions(-) diff --git a/front/src/components/Queue.vue b/front/src/components/Queue.vue index 8966c889c..ae4a447fe 100644 --- a/front/src/components/Queue.vue +++ b/front/src/components/Queue.vue @@ -194,7 +194,7 @@ You have a radio playing

New tracks will be appended here automatically.

-
Stop radio
+ diff --git a/front/src/components/audio/PlayButton.vue b/front/src/components/audio/PlayButton.vue index 9aa382c1d..08e114a43 100644 --- a/front/src/components/audio/PlayButton.vue +++ b/front/src/components/audio/PlayButton.vue @@ -9,10 +9,9 @@ -
+ @@ -270,9 +270,14 @@ export default { jQuery(this.$el).find('.ui.dropdown').dropdown({ selectOnKeydown: false, action: function (text, value, $el) { - // used ton ensure focusing the dropdown and clicking via keyboard + // used to ensure focusing the dropdown and clicking via keyboard // works as expected - self.$refs[$el.data('ref')].click() + let button = self.$refs[$el.data('ref')] + if (Array.isArray(button)) { + button[0].click() + } else { + button.click() + } jQuery(self.$el).find('.ui.dropdown').dropdown('hide') }, }) diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index 8766b5e9c..c2091141f 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -11,7 +11,7 @@
- +
@@ -59,48 +59,44 @@
- - - +