Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that modal dialogs escape inertness of ancestors. #7905

Merged
merged 2 commits into from
May 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -75959,9 +75959,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 @@ -75971,8 +75974,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