Commit 13aa7798 by Jonathan Piacenti

Alternative fix for popup accessibility.

parent cafdbe77
...@@ -237,11 +237,18 @@ function DragNDropTemplates(url_name) { ...@@ -237,11 +237,18 @@ 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',
{
attributes: {
'aria-live': 'polite',
'aria-atomic': 'true',
'aria-relevant': 'additions',
},
},
[
h( h(
popupSelector, popupSelector,
{ {
attributes: {'aria-live': 'polite'},
style: {display: ctx.popup_html ? 'block' : 'none'}, style: {display: ctx.popup_html ? 'block' : 'none'},
}, },
[ [
...@@ -251,10 +258,12 @@ function DragNDropTemplates(url_name) { ...@@ -251,10 +258,12 @@ function DragNDropTemplates(url_name) {
), ),
h('div.target-img-wrapper', [ h('div.target-img-wrapper', [
h('img.target-img', {src: ctx.target_img_src, alt: ctx.target_img_description}), 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