Skip to content

Commit 22115c0

Browse files
authored
JI-2899 Add aria label to width and height for embed popup (#110)
1 parent aaf26d5 commit 22115c0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

h5p.classes.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3736,7 +3736,8 @@ public function getLocalization() {
37363736
'copyrightWarning' => $this->h5pF->t('Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.'),
37373737
'keywordsExits' => $this->h5pF->t('Keywords already exists!'),
37383738
'someKeywordsExits' => $this->h5pF->t('Some of these keywords already exist'),
3739-
3739+
'width' => $this->h5pF->t('width'),
3740+
'height' => $this->h5pF->t('height')
37403741
);
37413742
}
37423743

js/h5p.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1348,7 +1348,7 @@ H5P.openReuseDialog = function ($element, contentData, library, instance, conten
13481348
*/
13491349
H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size, instance) {
13501350
var fullEmbedCode = embedCode + resizeCode;
1351-
var dialog = new H5P.Dialog('embed', H5P.t('embed'), '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' + H5P.t('size') + ': <input type="text" value="' + Math.ceil(size.width) + '" class="h5p-embed-size"/> × <input type="text" value="' + Math.ceil(size.height) + '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' + H5P.t('showAdvanced') + '</div><div class="h5p-expander-content"><p>' + H5P.t('advancedHelp') + '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' + resizeCode + '</textarea></div>', $element);
1351+
var dialog = new H5P.Dialog('embed', H5P.t('embed'), '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' + H5P.t('size') + ': <input aria-label="'+ H5P.t('width') +'" type="text" value="' + Math.ceil(size.width) + '" class="h5p-embed-size"/> × <input aria-label="'+ H5P.t('width') +'" type="text" value="' + Math.ceil(size.height) + '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' + H5P.t('showAdvanced') + '</div><div class="h5p-expander-content"><p>' + H5P.t('advancedHelp') + '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' + resizeCode + '</textarea></div>', $element);
13521352

13531353
// Selecting embed code when dialog is opened
13541354
H5P.jQuery(dialog).on('dialog-opened', function (event, $dialog) {

0 commit comments

Comments
 (0)