Skip to main content

ariaLabel

Optional. Sets the accessible name of the menu bar or of the root menu of a context menu, which a screen reader announces to the user

Usage​

ariaLabel?: string;

Example​

// names the menu bar
const menu = new dhx.Menu("menu_container", {
ariaLabel: "Main menu",
data: menuItems
});

// names the root menu of the context menu
const cmenu = new dhx.ContextMenu(null, {
ariaLabel: "File actions",
data: menuItems
});

In Menu, the value is rendered as the aria-label attribute of the element with the menubar role. Use the property to tell several menus on one page apart. If the property is not set, the menu bar has no accessible name.

In Context Menu, the value is rendered as the aria-label attribute of the root element of the context menu, which has the menu role. A nested menu is named after the text (or the tooltip) of the item that opens it, but the root menu has no such item. If the property is not set, the root menu has no accessible name.

Related article: Accessibility support: Toolbar, Menu, Sidebar and Ribbon

Change log:

added in v9.4