What is an inert element?

3

I asked a question about tabindex here on the site and I just bumping into the term inert elements .

I noticed that it's something in the w3c specification , and there's a Polyfill for the inert attribute .

On this I have some doubts:

  • What would an inert element be?
  • In HTML5, does an attribute exist that marks an element as inert?
  • If this is new, what might change with the implementation?
asked by anonymous 04.04.2017 / 03:36

1 answer

1

It is a feature that is under development but is not yet active in existing browsers.

  

The inert attribute is a draft feature of HTML. As of Feb 2017, in the browser > has a native implementation of inert. However, there is active development > inside Chrome, and other browsers have shown some renewed interest.

     

From the HTML spec -

     

A node (in particular elements and text nodes) can be marked as inert. > When a node is inert, then the user agent should 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 > the "find in page"), and may prevent the user from selecting text in that > node.

It is a feature that allows you to disable components, either for focus / activation / selection but also to disable search.

This is an attribute that should be optional for all of its possible uses in the near future if it goes into production.

There is already someone who is preparing components and scripts for Inert inclusion, trying to overcome the current limitation of browsers not recognizing the attribute by injecting via script.

References:

W3C Html 5.1 Inertness - link

Polyfill for the HTML inert attribute GitHub - link

    
04.04.2017 / 10:38