-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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: localize aria-labels #4027
Conversation
@@ -26,7 +26,7 @@ class CaptionsButton extends TextTrackButton { | |||
*/ | |||
constructor(player, options, ready) { | |||
super(player, options, ready); | |||
this.el_.setAttribute('aria-label', 'Captions Menu'); | |||
this.el_.setAttribute('aria-label', this.localize('Captions Menu')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OwenEdwards thoughts on whether we need to create a new item for this or if we can just re-use Captions
and Chapters
etc for these button labels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. I'll rebase this after that one gets merged then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment/question, but otherwise LGTM.
lang/en.json
Outdated
@@ -1,4 +1,6 @@ | |||
{ | |||
"audio player": "audio player", | |||
"video player": "video player", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be title-cased for consistency as long as we're pushing toward a major release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, these and others (e.g. "progress bar") ought to be title-cased.
181c09f
to
8d869b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor capitalization change needed.
@@ -48,7 +48,7 @@ class SeekBar extends Slider { | |||
return super.createEl('div', { | |||
className: 'vjs-progress-holder' | |||
}, { | |||
'aria-label': 'progress bar' | |||
'aria-label': this.localize('progress bar') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need to be in Title Case too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix #2728