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 for accessibility: Modal Dialog Button #3400

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions docs/guides/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ A sample dictionary for Spanish `['es']` would look as follows:
"Captions": "Subtítulos especiales",
"captions off": "Subtítulos especiales desactivados",
"Chapters": "Capítulos",
"Close Modal Dialog": "Cerca de diálogo modal",
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
Expand Down Expand Up @@ -80,6 +81,7 @@ NOTE: These need to be added after the core Video.js script.
"Captions": "Subtítulos especiales",
"captions off": "Subtítulos especiales desactivados",
"Chapters": "Capítulos",
"Close Modal Dialog": "Cerca de diálogo modal",
"You aborted the video playback": "Ha interrumpido la reproducción del vídeo.",
"A network error caused the video download to fail part-way.": "Un error de red ha interrumpido la descarga del vídeo.",
"The video could not be loaded, either because the server or network failed or because the format is not supported.": "No se ha podido cargar el vídeo debido a un fallo de red o del servidor o porque el formato es incompatible.",
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"Captions": "Captions",
"captions off": "captions off",
"Chapters": "Chapters",
"Close Modal Dialog": "Close Modal Dialog",
"Descriptions": "Descriptions",
"descriptions off": "descriptions off",
"You aborted the media playback": "You aborted the media playback",
Expand Down
1 change: 1 addition & 0 deletions src/js/modal-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class ModalDialog extends Component {
let temp = this.contentEl_;
this.contentEl_ = this.el_;
close = this.addChild('closeButton');
close.controlText('Close Modal Dialog');
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be better like this:

close = this.addChild('closeButton', {controlText: 'Close Modal Dialog'});

It avoids multiple internal calls to controlText().

this.contentEl_ = temp;
this.on(close, 'close', this.close);
}
Expand Down