MDL-72687 assign: fix stamp picker broken aria menu

This commit is contained in:
Simey Lameze 2021-11-02 10:44:25 +08:00
parent 62e5a4d19d
commit e1fdd3f701
4 changed files with 13 additions and 7 deletions

View File

@ -1988,9 +1988,11 @@ Y.extend(STAMPPICKER, M.assignfeedback_editpdf.dropdown, {
title = M.util.get_string('stamp', 'assignfeedback_editpdf');
button = Y.Node.create('<button><img height="16" width="16" alt="' + title + '" src="' + stamp + '"/></button>');
button.setAttribute('data-stamp', stamp);
button.setAttribute('role', 'menuitem');
button.setStyle('backgroundImage', 'none');
listitem = Y.Node.create('<li/>');
listitem.append(button);
listitem.setAttribute('role', 'none');
stamplist.append(listitem);
}, this);

View File

@ -1988,9 +1988,11 @@ Y.extend(STAMPPICKER, M.assignfeedback_editpdf.dropdown, {
title = M.util.get_string('stamp', 'assignfeedback_editpdf');
button = Y.Node.create('<button><img height="16" width="16" alt="' + title + '" src="' + stamp + '"/></button>');
button.setAttribute('data-stamp', stamp);
button.setAttribute('role', 'menuitem');
button.setStyle('backgroundImage', 'none');
listitem = Y.Node.create('<li/>');
listitem.append(button);
listitem.setAttribute('role', 'none');
stamplist.append(listitem);
}, this);

View File

@ -37,9 +37,11 @@ Y.extend(STAMPPICKER, M.assignfeedback_editpdf.dropdown, {
title = M.util.get_string('stamp', 'assignfeedback_editpdf');
button = Y.Node.create('<button><img height="16" width="16" alt="' + title + '" src="' + stamp + '"/></button>');
button.setAttribute('data-stamp', stamp);
button.setAttribute('role', 'menuitem');
button.setStyle('backgroundImage', 'none');
listitem = Y.Node.create('<li/>');
listitem.append(button);
listitem.setAttribute('role', 'none');
stamplist.append(listitem);
}, this);