diff --git a/source b/source index 56f8f352ac5..0ae99b8747d 100644 --- a/source +++ b/source @@ -3656,6 +3656,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The algorithm to
This section does not define or create any content attribute
- named "inert". This section merely defines an abstract concept of
- inertness. See also A node (in particular elements and text nodes) can be inert. When a node is
+ inert: Hit-testing must act as if the 'pointer-events' CSS property were set to
+ 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. Text selection functionality must act as if the 'user-select' CSS property
+ were set to For example, consider a page that consists of just a single inert
- paragraph positioned in the middle of a If it is editable, the node behaves as if it was non-editable. When a node is inert, it generally cannot be focused. Inert nodes that are The user agent may ignore the node for the purposes of text search (commonly known as
+ "find in page"). Inert nodes generally cannot be focused. Inert nodes that are commands will also get disabled. User agents may allow the user to override the restrictions on search and text selection,
+ however. By default, an element is not inert. A Inert subtrees
- inert
for an explanation of the
+ attribute of the same name.
+
+
+ none
.none
.body
. If a user moves their pointing device
- from the body
over to the inert paragraph and clicks on the paragraph,
- no mouseover
event would be fired, and the mousemove
and click
events would
- be fired on the body
element rather than the paragraph.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 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.)
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.
inert
attributeThe 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 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.