Skip to main content

ariaLabel

Optional. Sets the accessible name of the window, which a screen reader announces when the window opens

Usage​

ariaLabel?: string;

Example​

const dhxWindow = new dhx.Window({
ariaLabel: "Order details",
modal: true
});

dhxWindow.show();

The value is rendered as the aria-label attribute of the element with the dialog role. A window is exposed as a dialog, so it needs a name of its own to be distinguishable from the rest of the page.

The name is resolved in the following order:

  1. the ariaLabel value, when it is set;
  2. the title value, when the window has a header title;
  3. the aria_dialog locale key, which can be translated like the other screen-reader strings.

Set ariaLabel explicitly when the visible title is not descriptive enough on its own, or when the window has no title at all.

Related articles:

Change log:

added in v9.4