aria-modal
An ARIA property on a dialog saying that content outside it is not available while it is open.
In more detail
aria-modal="true" tells assistive technology to treat the rest of the page as inert. It does not actually block focus or clicks, so it is combined with a focus trap and the inert attribute.
Related terms
- modal dialog — A window laid over the page that users must deal with before returning to the page beneath, with role="dialog" and aria-modal="true".
- inert attribute — An HTML attribute that makes an element and everything inside it unclickable, unfocusable and hidden from assistive technology.
- focus trap — Code that keeps keyboard focus inside a container, such as an open modal, wrapping from the last element back to the first.
Taught in
- Modal Dialogs & Alert Dialogs: Accessible Overlay Patterns — Design Systems & Component Engineering