diff --git a/drag_and_drop_v2/public/js/drag_and_drop.js b/drag_and_drop_v2/public/js/drag_and_drop.js index 29678fee5..ff0274986 100644 --- a/drag_and_drop_v2/public/js/drag_and_drop.js +++ b/drag_and_drop_v2/public/js/drag_and_drop.js @@ -197,12 +197,13 @@ function DragAndDropTemplates(configuration) { }; var keyboardHelpPopupTemplate = function(ctx) { + var labelledby_id = 'modal-window-title-'+ctx.block_id; return ( h('div.keyboard-help-dialog', [ h('div.modal-window-overlay'), - h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': 'modal-window-title'}}, [ + h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': labelledby_id}}, [ h('div.modal-header', [ - h('h2.modal-window-title#modal-window-title', gettext('Keyboard Help')) + h('h2.modal-window-title#'+labelledby_id, gettext('Keyboard Help')) ]), h('div.modal-content', [ h('p', gettext('You can complete this problem using only your keyboard.')), @@ -236,7 +237,7 @@ function DragAndDropTemplates(configuration) { ); }; - var sidebarButtonTemplate = function(buttonClass, iconClass, buttonText, disabled, tabindex) { + var sidebarButtonTemplate = function(buttonClass, iconClass, buttonText, disabled) { return ( h('span.sidebar-button-wrapper', {}, [ h( @@ -936,6 +937,7 @@ function DragAndDropBlock(runtime, element, configuration) { var context = { // configuration - parts that never change: + block_id: $element.data('usage-id').replace(/[+@]/g, "_"), bg_image_width: bgImgNaturalWidth, // Not stored in configuration since it's unknown on the server side title_html: configuration.title, show_title: configuration.show_title,