From 9ae9c1756ec6348bc7279b82a1c34e9ef8ea23f2 Mon Sep 17 00:00:00 2001 From: Tim Nguyen Date: Thu, 30 Sep 2021 18:36:15 +0200 Subject: [PATCH] Add the inert attribute and tweak definition of inert subtrees Co-authored-by: Alice Boxhall --- source | 64 +++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 21 deletions(-) diff --git a/source b/source index 1433c4edf06..3359a614afd 100644 --- a/source +++ b/source @@ -74071,25 +74071,30 @@ END:VCARD

Inert subtrees

-

This section does not define or create any content attribute - named "inert". This section merely defines an abstract concept of - inertness.

+

See also inert for an explanation of the + attribute of the same name.

A node (in particular elements and text nodes) can be marked 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 - find-in-page, and may prevent the user from selecting text in that node. User agents - should allow the user to override the restrictions on search and text selection, however.

+ is inert:

+ + + +

User agents may allow the user to override the restrictions on search, text selection, + however.

+ +

By default, an element is not inert.

While a browsing context container is marked as inert, its nested browsing context's active document, and all nodes in that @@ -74103,17 +74108,33 @@ END:VCARD 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 shadow-including - descendants, must be marked inert. (The elements excepted by this paragraph - can additionally be marked inert through other means; being part of a modal dialog - does not "protect" a node from being marked inert.)

+ subject element and its flat tree descendants, must be marked + inert. (The elements excepted by this paragraph can additionally be marked + inert through other means; being part of a modal dialog does not "protect" a node + from being marked inert.)

The dialog element's showModal() method causes this mechanism to trigger, by adding the dialog element to its node + data-x="dom-dialog-showModal">showModal() method causes this mechanism to trigger, by + adding the dialog element to its node document's top layer.

+

The inert attribute

+ +

The inert attribute is a boolean attribute that + indicates, by its presence, that the element and all its flat tree descendants are + to be made inert by the user agent.

+ +

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 + inert, to avoid user confusion. In particular, it is worth remembering that not all users can see + all parts of a page at once; for example, users of screen readers, users on small devices or + with magnifiers, and even users just using particularly small windows might not be able to see + the active part of a page and might get frustrated if inert sections are not obviously inert. For + individual controls, the disabled attribute is probably + more appropriate.

+

The inert IDL attribute must reflect + the content attribute of the same name.

Tracking user activation

@@ -127248,6 +127269,7 @@ INSERT INTERFACES HERE Tim Altman, Tim Dresser, Tim Johansson, + Tim Nguyen, Tim Perry, Tim van der Lippe, TJ VanToll,