Commit 93d306ac by Matjaz Gregoric
parent aae9d4ed
......@@ -66,6 +66,7 @@ function DragAndDropTemplates(configuration) {
className += " grabbed-with-" + item.grabbed_with;
}
var attributes = {
'role': 'button',
'draggable': !item.drag_disabled,
'aria-grabbed': item.grabbed,
'data-value': item.value,
......@@ -211,6 +212,7 @@ function DragAndDropTemplates(configuration) {
'aria-dropeffect': 'move',
'data-uid': zone.uid,
'data-zone_align': zone.align,
'role': 'button',
'aria-describedby': zone_description_id,
},
style: {
......@@ -540,6 +542,7 @@ function DragAndDropTemplates(configuration) {
item_bank_properties.attributes['tabindex'] = 0;
item_bank_properties.attributes['dropzone'] = 'move';
item_bank_properties.attributes['aria-dropeffect'] = 'move';
item_bank_properties.attributes['role'] = 'button';
}
return (
h('div.themed-xblock.xblock--drag-and-drop', main_element_properties, [
......
......@@ -142,6 +142,7 @@ class TestDragAndDropRender(BaseIntegrationTest):
for index, item in enumerate(items):
item_number = index + 1
self.assertEqual(item.get_attribute('role'), 'button')
self.assertEqual(item.get_attribute('tabindex'), '0')
self.assertEqual(item.get_attribute('draggable'), 'true')
self.assertEqual(item.get_attribute('aria-grabbed'), 'false')
......
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