Content-Length: 363879 | pFad | http://github.com/videojs/video.js/pull/5671/files

87 Move the "-" in remaining-time-display.js so it is not announced by screen readers. Fixes #5168 by smbea · Pull Request #5671 · videojs/video.js · GitHub
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 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
21 changes: 10 additions & 11 deletions src/js/control-bar/time-controls/remaining-time-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*/
import TimeDisplay from './time-display';
import Component from '../../component.js';
import * as Dom from '../../utils/dom.js';

/**
* Displays the time left in the video
*
Expand Down Expand Up @@ -36,19 +38,16 @@ class RemainingTimeDisplay extends TimeDisplay {
}

/**
* The remaining time display prefixes numbers with a "minus" character.
*
* @param {number} time
* A numeric time, in seconds.
* Create the `Component`'s DOM element with the "minus" characted prepend to the time
*
* @return {string}
* A formatted time
*
* @private
* @return {Element}
* The element that was created.
*/
formatTime_(time) {
// TODO: The "-" should be decorative, and not announced by a screen reader
return '-' + super.formatTime_(time);
createEl() {
const el = super.createEl();
OwenEdwards 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/control-bar/time-controls/time-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TimeDisplay extends Component {
* @return {Element}
* The element that was created.
*/
createEl(plainName) {
createEl() {
const className = this.buildCSSClass();
const el = super.createEl('div', {
className: `${className} vjs-time-control vjs-control`,
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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/videojs/video.js/pull/5671/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy