Commit 13aa7798 by Jonathan Piacenti

Alternative fix for popup accessibility.

parent cafdbe77
...@@ -237,24 +237,33 @@ function DragNDropTemplates(url_name) { ...@@ -237,24 +237,33 @@ function DragNDropTemplates(url_name) {
'div.item-bank', 'div.item-bank',
renderCollection(itemTemplate, items_in_bank, ctx) renderCollection(itemTemplate, items_in_bank, ctx)
), ),
h('div.target', [ h('div.target',
h( {
popupSelector, attributes: {
{ 'aria-live': 'polite',
attributes: {'aria-live': 'polite'}, 'aria-atomic': 'true',
style: {display: ctx.popup_html ? 'block' : 'none'}, 'aria-relevant': 'additions',
}, },
[ },
h('div.close.icon-remove-sign.fa-times-circle'), [
h('p.popup-content', {innerHTML: ctx.popup_html}), h(
popupSelector,
{
style: {display: ctx.popup_html ? 'block' : 'none'},
},
[
h('div.close.icon-remove-sign.fa-times-circle'),
h('p.popup-content', {innerHTML: ctx.popup_html}),
]
),
h('div.target-img-wrapper', [
h('img.target-img', {src: ctx.target_img_src, alt: ctx.target_img_description}),
] ]
), ),
h('div.target-img-wrapper', [
h('img.target-img', {src: ctx.target_img_src, alt: ctx.target_img_description}),
]),
renderCollection(zoneTemplate, ctx.zones, ctx), renderCollection(zoneTemplate, ctx.zones, ctx),
renderCollection(itemTemplate, items_placed, ctx), renderCollection(itemTemplate, items_placed, ctx),
]), ]
),
]), ]),
keyboardHelpTemplate(ctx), keyboardHelpTemplate(ctx),
feedbackTemplate(ctx), feedbackTemplate(ctx),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment