Element: ariaModal property - Web APIs | MDN

Value

A string with one of the following values:

"true"

The element is modal.

"false"

The element is not modal.

Examples

In this example the aria-modal attribute on the element with an ID of address-modal is set to "true" indicating that this is a modal dialog. Using ariaModal we update the value to "false".

html

<div
  role="dialog"
  id="address-modal"
  aria-labelledby="dialog1Title"
  aria-describedby="dialog1Desc"
  aria-modal="true"></div>

js

let el = document.getElementById("address-modal");
console.log(el.ariaModal); // "true"
el.ariaModal = "false";
console.log(el.ariaModal); // "false"

Specifications

Specification
Accessible Rich Internet Applications (WAI-ARIA)
# dom-ariamixin-ariamodal

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.