Support the `inert` attribute
The inert attribute currently being explored in the WICG solves this problem by providing a mechanism to disable entire subtrees in HTML. By setting `inert` on an HTML element, it renders every interactive control non-focusable and removes it from the accessibility tree.
Inert means no more walking of the DOM to set and restore tabindex, and forgetting to set `aria-hidden="true"` on a parent element (it happens all the time). The inverse also commonly occurs–developers set `aria-hidden="true"` on a parent element, and forget to modify tabindex on links and buttons, causing "ghost controls" with no accessibility information. Like I said, it's extremely error-prone. We need `inert` to make these scenarios much easier. It's a breeze in comparison! Set it on a sibling element to the one that remains visible, and you can handle focusability and AT access in one go.
Carolyn MacLeod commented
Steven Vachon commented
From the spec:
"This section does not define or create any content attribute named 'inert'. This section merely defines an abstract concept of inertness."