The inert attribute allows web authors to mark parts of the DOM tree as inert: When a node is inert, then the user agent must act as if the node was absent for the purposes of targeting user interaction events, may ignore the node for the purposes of text search user interfaces (commonly known as "find in page"), and may prevent the user from selecting text in that node.
Developers need to make content temporarily non-interactive in a range of circumstances; the most common is when implementing modal UI, but other examples include previous/next slide previews in a slide show, and making currently inactive content non-interactive during verification or other other time-consuming blocking operations. While the modal UI use case would benefit from an API directly addressing that use case, any API designed for that case would still need to use the concept of inertness, and this API is a very minimal addition to that concept which is easy for developers to understand, which enables all of the use cases described above, including non-modal cases.
Specification being incubated in a Community Group
Status in Chromium
In developer trial (Behind a flag)
Consensus & Standardization
- Worth prototyping
- No signal
Intent to Prototype urlIntent to Prototype thread
Search tagsinert, focus, accessibility, keyboard, events, pointer,
Last updated on 2021-05-27