Skip to content

Commit

Permalink
fix: apply correct styles to audio descriptions track menu items (#8770)
Browse files Browse the repository at this point in the history
## Description
Fix #8769 for mismatched track kind should be plural descriptions
according to definition of `AudioTrackKind`
#8769

## Specific Changes proposed
Corrects `description` to `descriptions`
  • Loading branch information
david-hm-morgan authored Jun 25, 2024
1 parent 2b3ffd4 commit f701102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/css/components/_audio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
@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;
margin-bottom: -0.1em;
}

// 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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}, {
Expand Down

0 comments on commit f701102

Please sign in to comment.