Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: controlText for text track modal #8989

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/js/tracks/text-track-settings-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ class TrackSettingsControls extends Component {
super(player, options);

// Create DOM elements
const defaultsDescription = this.localize('restore all settings to the default values');

const resetButton = new Button(player, {
controlText: defaultsDescription,
controlText: this.localize('restore all settings to the default values'),
className: 'vjs-default-button'
});

Expand All @@ -28,14 +26,15 @@ class TrackSettingsControls extends Component {

this.addChild(resetButton);

const doneText = this.localize('Done');
const doneButton = new Button(player, {
controlText: defaultsDescription,
controlText: doneText,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's repeating the text content, we shouldn't need control text (though, worth verifying with a screen reader).

className: 'vjs-done-button'
});

// Remove unrequired style classes
doneButton.el().classList.remove('vjs-control', 'vjs-button');
doneButton.el().textContent = this.localize('Done');
doneButton.el().textContent = doneText;

this.addChild(doneButton);
}
Expand Down