From f701102fe9248f4afb1ca697b9efc63a2d3517f5 Mon Sep 17 00:00:00 2001 From: David HM Morgan <37144605+david-hm-morgan@users.noreply.github.com> Date: Tue, 25 Jun 2024 19:19:38 +0100 Subject: [PATCH] fix: apply correct styles to audio descriptions track menu items (#8770) ## Description Fix #8769 for mismatched track kind should be plural descriptions according to definition of `AudioTrackKind` https://github.com/videojs/video.js/issues/8769 ## Specific Changes proposed Corrects `description` to `descriptions` --- src/css/components/_audio.scss | 4 ++-- .../control-bar/audio-track-controls/audio-track-menu-item.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/css/components/_audio.scss b/src/css/components/_audio.scss index 7d05921544..3f7d7031db 100644 --- a/src/css/components/_audio.scss +++ b/src/css/components/_audio.scss @@ -2,7 +2,7 @@ @extend .vjs-icon-audio; } -.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder, +.video-js .vjs-audio-button + .vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder { vertical-align: middle; display: inline-block; @@ -10,7 +10,7 @@ } // Mark a main-desc-menu-item (main + description) or description item with a trailing Audio Description icon -.video-js .vjs-audio-button + .vjs-menu .vjs-description-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before, +.video-js .vjs-audio-button + .vjs-menu .vjs-descriptions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before, .video-js .vjs-audio-button + .vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before { font-family: VideoJS; content: " \f12e"; diff --git a/src/js/control-bar/audio-track-controls/audio-track-menu-item.js b/src/js/control-bar/audio-track-controls/audio-track-menu-item.js index 4c7d344e83..be26f6be94 100644 --- a/src/js/control-bar/audio-track-controls/audio-track-menu-item.js +++ b/src/js/control-bar/audio-track-controls/audio-track-menu-item.js @@ -51,7 +51,7 @@ class AudioTrackMenuItem extends MenuItem { const el = super.createEl(type, props, attrs); const parentSpan = el.querySelector('.vjs-menu-item-text'); - if (['main-desc', 'description'].indexOf(this.options_.track.kind) >= 0) { + if (['main-desc', 'descriptions'].indexOf(this.options_.track.kind) >= 0) { parentSpan.appendChild(Dom.createEl('span', { className: 'vjs-icon-placeholder' }, {