mirror of
https://github.com/videojs/video.js.git
synced 2024-12-25 02:42:10 +02:00
fix: Add alternate text to the loading spinner. (#4916)
This is a first in a few changes related to #4902. This just adds a text alternative to the loading spinner. In future PRs, we would make it alert to screen readers and potentially have a generic alerting mechanism.
This commit is contained in:
parent
0ace2a5449
commit
50831e3381
@ -15,7 +15,7 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
<!-- START langtable -->
|
||||
| Language file | Missing translations |
|
||||
| ----------------------- | ----------------------------------------------------------------------------------- |
|
||||
| ar.json (missing 50) | Audio Player |
|
||||
| ar.json (missing 51) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -65,7 +65,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| ba.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| ba.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -123,7 +124,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| bg.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| bg.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -181,7 +183,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| ca.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| ca.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -239,7 +242,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| cs.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| cs.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -297,7 +301,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| da.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| da.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -355,8 +360,9 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| de.json (Complete) | |
|
||||
| el.json (missing 44) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| de.json (missing 1) | {1} is loading. |
|
||||
| el.json (missing 45) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -400,7 +406,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| es.json (missing 57) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| es.json (missing 58) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -457,8 +464,9 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| fa.json (Complete) | |
|
||||
| fi.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| fa.json (missing 1) | {1} is loading. |
|
||||
| fi.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -516,8 +524,9 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| fr.json (Complete) | |
|
||||
| gl.json (missing 57) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| fr.json (missing 1) | {1} is loading. |
|
||||
| gl.json (missing 58) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -574,8 +583,9 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| he.json (Complete) | |
|
||||
| hr.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| he.json (missing 1) | {1} is loading. |
|
||||
| hr.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -633,7 +643,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| hu.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| hu.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -691,7 +702,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| it.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| it.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -749,7 +761,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| ja.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| ja.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -807,7 +820,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| ko.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| ko.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -865,7 +879,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| nb.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| nb.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -923,8 +938,9 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| nl.json (Complete) | |
|
||||
| nn.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| nl.json (missing 1) | {1} is loading. |
|
||||
| nn.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -982,7 +998,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| pl.json (missing 50) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| pl.json (missing 51) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -1032,7 +1049,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| pt-BR.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| pt-BR.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -1090,7 +1108,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| pt-PT.json (missing 43) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| pt-PT.json (missing 44) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Progress Bar |
|
||||
| | progress bar timing: currentTime={1} duration={2} |
|
||||
@ -1133,9 +1152,10 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| ru.json (Complete) | |
|
||||
| sk.json (Complete) | |
|
||||
| sr.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| ru.json (missing 1) | {1} is loading. |
|
||||
| sk.json (missing 1) | {1} is loading. |
|
||||
| sr.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -1193,7 +1213,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| sv.json (missing 58) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| sv.json (missing 59) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -1251,7 +1272,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| tr.json (missing 8) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| tr.json (missing 9) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Progress Bar |
|
||||
| | progress bar timing: currentTime={1} duration={2} |
|
||||
@ -1259,7 +1281,8 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Reset |
|
||||
| | restore all settings to the default values |
|
||||
| | End of dialog window. |
|
||||
| uk.json (missing 44) | Audio Player |
|
||||
| | {1} is loading. |
|
||||
| uk.json (missing 45) | Audio Player |
|
||||
| | Video Player |
|
||||
| | Replay |
|
||||
| | Progress Bar |
|
||||
@ -1303,7 +1326,10 @@ This default value is hardcoded as a default to the localize method in the SeekB
|
||||
| | Caption Settings Dialog |
|
||||
| | Beginning of dialog window. Escape will cancel and close the window. |
|
||||
| | End of dialog window. |
|
||||
| vi.json (Complete) | |
|
||||
| zh-CN.json (missing 1) | progress bar timing: currentTime={1} duration={2} |
|
||||
| zh-TW.json (missing 1) | progress bar timing: currentTime={1} duration={2} |
|
||||
| | {1} is loading. |
|
||||
| vi.json (missing 1) | {1} is loading. |
|
||||
| zh-CN.json (missing 2) | progress bar timing: currentTime={1} duration={2} |
|
||||
| | {1} is loading. |
|
||||
| zh-TW.json (missing 2) | progress bar timing: currentTime={1} duration={2} |
|
||||
| | {1} is loading. |
|
||||
<!-- END langtable -->
|
||||
|
@ -80,5 +80,6 @@
|
||||
"Done": "Done",
|
||||
"Caption Settings Dialog": "Caption Settings Dialog",
|
||||
"Beginning of dialog window. Escape will cancel and close the window.": "Beginning of dialog window. Escape will cancel and close the window.",
|
||||
"End of dialog window.": "End of dialog window."
|
||||
"End of dialog window.": "End of dialog window.",
|
||||
"{1} is loading.": "{1} is loading."
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
* @file loading-spinner.js
|
||||
*/
|
||||
import Component from './component';
|
||||
import * as dom from './utils/dom';
|
||||
|
||||
/**
|
||||
* A loading spinner for use during waiting/loading events.
|
||||
@ -17,10 +18,21 @@ class LoadingSpinner extends Component {
|
||||
* The dom element that gets created.
|
||||
*/
|
||||
createEl() {
|
||||
return super.createEl('div', {
|
||||
const isAudio = this.player_.isAudio();
|
||||
const playerType = this.localize(isAudio ? 'Audio Player' : 'Video Player');
|
||||
const controlText = dom.createEl('span', {
|
||||
className: 'vjs-control-text',
|
||||
innerHTML: this.localize('{1} is loading.', [playerType])
|
||||
});
|
||||
|
||||
const el = super.createEl('div', {
|
||||
className: 'vjs-loading-spinner',
|
||||
dir: 'ltr'
|
||||
});
|
||||
|
||||
el.appendChild(controlText);
|
||||
|
||||
return el;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user