Add role attributes in context menus
This commit is contained in:
parent
d178ac9749
commit
012ca805c1
@ -99,7 +99,10 @@ module.exports = class ContextMenu {
|
|||||||
|
|
||||||
function showContextMenu(contextMenuItems, selectedElement, event) {
|
function showContextMenu(contextMenuItems, selectedElement, event) {
|
||||||
const target = $(event.currentTarget);
|
const target = $(event.currentTarget);
|
||||||
const contextMenu = $("<ul>", {id: "context-menu"});
|
const contextMenu = $("<ul>", {
|
||||||
|
id: "context-menu",
|
||||||
|
role: "menu",
|
||||||
|
});
|
||||||
|
|
||||||
for (const item of contextMenuItems) {
|
for (const item of contextMenuItems) {
|
||||||
if (item.check(target)) {
|
if (item.check(target)) {
|
||||||
|
@ -1 +1 @@
|
|||||||
<li class="context-menu-divider" />
|
<li class="context-menu-divider" aria-hidden="true"></li>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<li class="context-menu-item context-menu-{{class}}" data-action="{{action}}"{{#if data}} data-data="{{data}}"{{/if}} tabindex="0">
|
<li class="context-menu-item context-menu-{{class}}" data-action="{{action}}"{{#if data}} data-data="{{data}}"{{/if}} tabindex="0" role="menuitem">
|
||||||
{{text}}
|
{{text}}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
Reference in New Issue
Block a user