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.
Motivation
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.
Demo
Documentation
Specification
Status in Chromium
In developer trial (Behind a flag) (tracking bug) in:
- Chrome for desktop release 60
- Chrome for Android release 60
- Android WebView release 60
Consensus & Standardization
- Worth prototyping
- No signal
- No signal
- Positive
Owner
Intent to Prototype url
Intent to Prototype threadSearch tags
inert, focus, accessibility, keyboard, events, pointer,Last updated on 2021-03-30