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

Public discussion

Status in Chromium

Blink>HTML


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

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Worth prototyping
  • No signal
  • No signal
  • Positive

Owner

Intent to Prototype url

Intent to Prototype thread

Search tags

inert, focus, accessibility, keyboard, events, pointer,

Last updated on 2021-05-27