mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 11:26:41 +02:00
MDL-43267 Javascript: Remove aria drag/drop related attributes for drag/drop
Since we provide an alternative interface rather than describing the locations for each drop, we should not add aria-grabbed, or aria-dropeffect.
This commit is contained in:
parent
de5c64fa7c
commit
472b07b8e7
1 changed files with 0 additions and 7 deletions
7
lib/yui/dragdrop/dragdrop.js
vendored
7
lib/yui/dragdrop/dragdrop.js
vendored
|
@ -62,7 +62,6 @@ YUI.add('moodle-core-dragdrop', function(Y) {
|
|||
.setAttribute('title', title)
|
||||
.setAttribute('tabIndex', 0)
|
||||
.setAttribute('data-draggroups', this.groups)
|
||||
.setAttribute('aria-grabbed', 'false')
|
||||
.setAttribute('role', 'button');
|
||||
dragelement.appendChild(dragicon);
|
||||
dragelement.addClass(MOVEICON.cssclass);
|
||||
|
@ -266,8 +265,6 @@ YUI.add('moodle-core-dragdrop', function(Y) {
|
|||
M.core.dragdrop.keydragcontainer = dragcontainer;
|
||||
M.core.dragdrop.keydraghandle = draghandle;
|
||||
|
||||
// Indicate to a screenreader the node that is selected for drag and drop.
|
||||
dragcontainer.setAttribute('aria-grabbed', 'true');
|
||||
// Get the name of the thing to move.
|
||||
var nodetitle = this.find_element_text(dragcontainer);
|
||||
var dialogtitle = M.util.get_string('movecontent', 'moodle', nodetitle);
|
||||
|
@ -322,8 +319,6 @@ YUI.add('moodle-core-dragdrop', function(Y) {
|
|||
|
||||
// Add a data attribute so we can get the real drop target.
|
||||
listlink.setAttribute('data-drop-target', node.get('id'));
|
||||
// Notify the screen reader this is a valid drop target.
|
||||
listlink.setAttribute('aria-dropeffect', 'move');
|
||||
// Allow tabbing to the link.
|
||||
listlink.setAttribute('tabindex', '0');
|
||||
|
||||
|
@ -413,7 +408,6 @@ YUI.add('moodle-core-dragdrop', function(Y) {
|
|||
global_keyboard_drop : function(e) {
|
||||
// The drag node was saved.
|
||||
var dragcontainer = M.core.dragdrop.keydragcontainer;
|
||||
dragcontainer.setAttribute('aria-grabbed', 'false');
|
||||
// The real drop node is stored in an attribute of the proxy.
|
||||
var droptarget = Y.one('#' + e.target.getAttribute('data-drop-target'));
|
||||
|
||||
|
@ -438,7 +432,6 @@ YUI.add('moodle-core-dragdrop', function(Y) {
|
|||
*/
|
||||
global_cancel_keyboard_drag : function() {
|
||||
if (M.core.dragdrop.keydragcontainer) {
|
||||
M.core.dragdrop.keydragcontainer.setAttribute('aria-grabbed', 'false');
|
||||
M.core.dragdrop.keydraghandle.focus();
|
||||
M.core.dragdrop.keydragcontainer = null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue