From 7e5231c3347b042ca86eaf20be336a1e58d62388 Mon Sep 17 00:00:00 2001 From: Agate Date: Tue, 4 Aug 2020 11:27:06 +0200 Subject: [PATCH] Fixed aria label on play button --- front/src/components/audio/PlayButton.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/front/src/components/audio/PlayButton.vue b/front/src/components/audio/PlayButton.vue index c7a2c0b75..9aa382c1d 100644 --- a/front/src/components/audio/PlayButton.vue +++ b/front/src/components/audio/PlayButton.vue @@ -78,13 +78,26 @@ export default { }, computed: { labels () { + let replacePlay + if (this.track) { + replacePlay = this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play track') + } else if (this.album) { + replacePlay = this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play album') + } else if (this.artist) { + replacePlay = this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play artist') + } else if (this.playlist) { + replacePlay = this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play playlist') + } else { + replacePlay = this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play tracks') + } + return { playNow: this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play now'), addToQueue: this.$pgettext('*/Queue/Dropdown/Button/Title', 'Add to current queue'), playNext: this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play next'), startRadio: this.$pgettext('*/Queue/Dropdown/Button/Title', 'Play similar songs'), - replacePlay: this.$pgettext('*/Queue/Dropdown/Button/Title', 'Replace current queue'), report: this.$pgettext('*/Moderation/*/Button/Label,Verb', 'Report…'), + replacePlay, } }, title () {