mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9k stars 22.44k forks source link

"escape inertness" mentioned but never explained how to #34619

Open mangelozzi opened 2 weeks ago

mangelozzi commented 2 weeks ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert

What specific section or headline is this issue about?

The intro

What information was incorrect, unhelpful, or incomplete?

With the inert attribute, all of the element's flat tree descendants (such as modal <dialog>s) that don't otherwise escape inertness are ignored.

What did you expect to see?

An explanation of how to "escape inertness". Neither this page, nor any of the "See Also" explain how to "escape inertness". If one wish to make everything inert except a certain elements and it's children, I imagine you would apply inert to the document then escape it somehow...

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

Thanks, these docs are very helpful!

MDN metadata

Page report details * Folder: `en-us/web/html/global_attributes/inert` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/html/global_attributes/inert/index.md * Last commit: https://github.com/mdn/content/commit/2f8e24c7de5cc12c7de0a830fcac4d7d31c9f787 * Document last modified: 2024-05-15T03:47:41.000Z
Josh-Cena commented 2 weeks ago

Relevant spec:

A Document document is blocked by a modal dialog subject if subject is the topmost dialog element in document's top layer. While document is so blocked, every node that is connected to document, with the exception of the subject element and its flat tree descendants, must become inert.

subject can additionally become inert via the inert attribute, but only if specified on subject itself (i.e., subject escapes inertness of ancestors); subject's flat tree descendants can become inert in a similar fashion.

The inert attribute is a boolean attribute that indicates, by its presence, that the element and all its flat tree descendants which don't otherwise escape inertness (such as modal dialogs) are to be made inert by the user agent.

mangelozzi commented 1 week ago

Great, do you think that's worth adding to the MDN site? From that description it sounds like there is no way to escape inertness by say some attribute e.g. noninert (by a made up attribute by me ). So escaping inertness is not something the website maker can control, I think from what that says.