Skip to content

Commit

Permalink
Clarify that modal dialogs escape inertness of ancestors
Browse files Browse the repository at this point in the history
Closes whatwg#7808.
  • Loading branch information
emilio authored and mfreed7 committed Jun 3, 2022
1 parent b08e951 commit 4b7e443
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -75962,9 +75962,12 @@ END:VCARD</pre>
<var>document</var>'s <span>top layer</span>. While <var>document</var> is so blocked, every node
that is <span>connected</span> to <var>document</var>, with the exception of the
<var>subject</var> element and its <span>flat tree</span> descendants, must become
<span>inert</span>. (The elements excepted by this paragraph can additionally become
<span>inert</span> through other means; being part of a modal dialog does not "protect" a node
from being <span>inert</span>.)</p>
<span>inert</span>.</p>

<p><var>subject</var> can additionally become <span>inert</span> via the <code
data-x="attr-inert">inert</code> attribute, but only if specified on <var>subject</var> itself
(i.e., <var>subject</var> escapes inertness of ancestors); <var>subject</var>'s <span>flat
tree</span> descendants can become <span>inert</span> in a similar fashion.</p>

<p class="note">The <code>dialog</code> element's <code
data-x="dom-dialog-showModal">showModal()</code> method causes this mechanism to trigger, by
Expand All @@ -75974,8 +75977,9 @@ END:VCARD</pre>
<h4>The <dfn data-x="attr-inert"><code>inert</code></dfn> attribute</h4>

<p>The <code data-x="attr-inert">inert</code> attribute is a <span>boolean attribute</span> that
indicates, by its presence, that the element and all its <span>flat tree</span> descendants are
to be made <span>inert</span> by the user agent.</p>
indicates, by its presence, that the element and all its <span>flat tree</span> descendants which
don't otherwise escape inertness (such as modal dialogs) are to be made <span>inert</span> by the
user agent.</p>

<p class="note">By default, there is no persistent visual indication of a subtree being inert.
Authors are encouraged to clearly mark what parts of their document are active and which are
Expand Down

0 comments on commit 4b7e443

Please sign in to comment.