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

Move the "-" in remaining-time-display.js so it is not announced by screen readers. Fixes #5168 #5671

Merged
merged 4 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/js/control-bar/time-controls/remaining-time-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RemainingTimeDisplay extends TimeDisplay {
*/
formatTime_(time) {
// TODO: The "-" should be decorative, and not announced by a screen reader
return '-' + super.formatTime_(time);
return super.formatTime_(time);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions src/js/control-bar/time-controls/time-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class TimeDisplay extends Component {

this.updateTextNode_();
el.appendChild(this.contentEl_);
if (className === 'vjs-remaining-time') {
gkatsev marked this conversation as resolved.
Show resolved Hide resolved
el.insertBefore(Dom.createEl('span', {}, {'aria-hidden': true}, '-'), this.contentEl_);
}

return el;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const bind = function(context, fn, uid) {
* @param {Function} fn
* The function to be throttled.
*
* @param {Number} wait
* @param {number} wait
* The number of milliseconds by which to throttle.
*
* @return {Function}
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const getAbsoluteURL = function(url) {
* @param {string} path
* The fileName path like '/path/to/file.mp4'
*
* @returns {string}
* @return {string}
* The extension in lower case or an empty string if no
* extension could be found.
*/
Expand Down