Skip to content

Commit

Permalink
JI-2899 Add aria label to width and height for embed popup (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravimajithia authored Nov 10, 2021
1 parent aaf26d5 commit 22115c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion h5p.classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -3736,7 +3736,8 @@ public function getLocalization() {
'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.'),
'keywordsExits' => $this->h5pF->t('Keywords already exists!'),
'someKeywordsExits' => $this->h5pF->t('Some of these keywords already exist'),

'width' => $this->h5pF->t('width'),
'height' => $this->h5pF->t('height')
);
}

Expand Down
2 changes: 1 addition & 1 deletion js/h5p.js
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ H5P.openReuseDialog = function ($element, contentData, library, instance, conten
*/
H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size, instance) {
var fullEmbedCode = embedCode + resizeCode;
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);
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);

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

0 comments on commit 22115c0

Please sign in to comment.