diff --git a/images/inert-example-loading-section.png b/images/inert-example-loading-section.png new file mode 100644 index 00000000000..b94a3da0d5a Binary files /dev/null and b/images/inert-example-loading-section.png differ diff --git a/source b/source index 737bb2c7c36..f2b1ad0c18f 100644 --- a/source +++ b/source @@ -1827,7 +1827,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
If removedNode's popover
attribute is not in
the no popover state, then run the hide
- popover algorithm given removedNode, false, true, and false.
A potential destination
A fetch priority attribute is an enumerated attribute. The following + table lists the keywords and states for the attribute — the keywords in the left column map to + the states in the cell in the second column on the same row as the keyword.
+ +Keyword + | State + | Description + |
---|---|---|
high
+ | high + | Signals a high-priority fetch relative to other + resources with the same destination. + |
low
+ | low + | Signals a low-priority fetch relative to other + resources with the same destination. + |
auto
+ | auto + | Signals automatic determination of fetch priority + relative to other resources with the same destination. + |
The attribute's missing value default and + invalid value default are both the + auto state.
+blocking
color
disabled
fetchpriority
title
attribute has special semantics on this element.<link disabled rel="alternate stylesheet" href="css/pooh">
+ The fetchpriority
attribute is a fetch
+ priority attribute that is intended for use with external resource links, where it is used to set the priority used when fetching and processing the linked
+ resource.
rel
,
sizes
,
type
,
- blocking
and
+ blocking
, and
disabled
each must reflect the respective content attributes of the same name.
@@ -14761,6 +14812,11 @@ interface HTMLLinkElement : HTMLElement {
reflect the referrerpolicy
content
attribute, limited to only known values.
+ The fetchPriority
IDL attribute must
+ reflect the fetchpriority
content
+ attribute, limited to only known values.
The imageSrcset
IDL attribute must reflect the
imagesrcset
content attribute.
Set request's client to options's environment.
Set request's priority to + options's fetch priority.
Return request.
Document
auto
)A link processing options has a HTMLLinkElement : HTMLElement {
If attribs[" If attribs[" Let referrer policy be the current state of el's Let fetch priority be the current state of el's Let options be a script fetch options whose cryptographic nonce is cryptographic
nonce, integrity metadata is
integrity metadata, parser
metadata is "fetchpriority
+ content attributetype
"] exists, then set options's type to attribs["type
"].fetchpriority
"]
+ exists and is an ASCII case-insensitive match for
+ a fetch priority attribute keyword, then set options's fetch priority to that fetch priority
+ attribute keyword.referrerpolicy
attribute.fetchpriority
attribute.not-parser-inserted
", credentials mode is credentials
- mode, and referrer
- policy is referrer policy.
Fetch a modulepreload module script graph given url, @@ -26161,11 +26239,10 @@ document.body.appendChild(wbr);
The preload
keyword indicates that the user agent will
preemptively fetch and cache the specified resource according
to the potential destination given by the
- as
attribute (and the priority associated with the corresponding destination), as it is highly likely that the user
- will require this resource for the current navigation.
as
attribute, and the priority given by the fetchpriority
attribute, as it is highly likely that the
+ user will require this resource for the current navigation.
User-agents might perform additional operations when a resource is loaded, such as
preemptively decoding images or HTMLSourceElement : HTMLElement {
referrerpolicy
decoding
loading
fetchpriority
alt
attribute: HTMLImageElement : HTMLElement {
[CEReactions] attribute DOMString referrerPolicy;
[CEReactions] attribute DOMString decoding;
[CEReactions] attribute DOMString loading;
+ [CEReactions] attribute DOMString fetchPriority;
Promise<undefined> decode();
@@ -27913,6 +27992,12 @@ interface HTMLImageElement : HTMLElement {
default">invalid value default are both the auto state.
The fetchpriority
attribute is a fetch
+ priority attribute. Its purpose is to set the priority used when fetching the image.
The loading
attribute is a lazy
loading attribute. Its purpose is to indicate the policy for loading images that are
outside the viewport.
loading
content
attribute, limited to only known values.
+ The fetchPriority
IDL attribute
+ must reflect the fetchpriority
content
+ attribute, limited to only known values.
referrerpolicy
attribute.
+ Set request's priority to the current state of the
+ element's fetchpriority
attribute.
Let delay load event be true if the img
's lazy loading
attribute is in the Eager state, or if
scripting is disabled for the img
, and
@@ -30639,6 +30733,10 @@ was an English <a href="/wiki/Music_hall">music hall</a> singer, ...referrer policy to the current state of
the element's referrerpolicy
attribute.
Set request's priority to the current state of the element's fetchpriority
attribute.
Let response be the result of fetching request.
integrity
referrerpolicy
blocking
fetchpriority
nomodule
,
defer
, crossorigin
, integrity
, and referrerpolicy
attributes must not be specified.
+ data-x="attr-script-integrity">integrity, referrerpolicy
, and fetchpriority
attributes must not be specified.
The nomodule
attribute is a boolean attribute that prevents a script from being executed in user
@@ -60072,14 +60173,21 @@ interface HTMLScriptElement : HTMLElement {
The blocking
attribute is a blocking attribute.
The fetchpriority
attribute is a
+ fetch priority attribute. Its purpose is to set the priority used when fetching the script.
Changing the src
, type
, nomodule
, async
, defer
, crossorigin
, integrity
, and referrerpolicy
attributes dynamically has no direct effect; these
- attributes are only used at specific times described below.
referrerpolicy
, and fetchpriority
attributes dynamically has no direct
+ effect; these attributes are only used at specific times described below.
referrerpolicy
content
attribute, limited to only known values.
+ The fetchPriority
IDL attribute must
+ reflect the fetchpriority
+ content attribute, limited to only known values.
The Let referrer policy be the current state of el's Let fetch priority be the current state of el's Let parser metadata be "crossOrigin
IDL attribute must reflect
the crossorigin
content attribute, limited to
@@ -60655,6 +60768,9 @@ o............A....e
referrerpolicy
content attribute.fetchpriority
content attribute.parser-inserted
" if
el is parser-inserted, and "not-parser-inserted
"
otherwise.
Let settings object be el's node document's relevant settings object.
If it is editable, the node behaves as if it were non-editable.
The user agent may ignore the node for the purposes of find-in-page.
The user agent should ignore the node for the purposes of find-in-page.
Inert nodes generally cannot be focused. Inert nodes that are commands will also get disabled.
+Inert nodes generally cannot be focused, and user agents do not expose the inert + nodes to accessibility APIs or assistive technologies. Inert nodes that are commands will become inoperable to users, in the manner described + above.
-User agents may allow the user to override the restrictions on search and text selection, - however.
+User agents may allow the user to override the restrictions on find-in-page and + text selection, however.
By default, a node is not inert.
@@ -76156,19 +76276,84 @@ END:VCARD don't otherwise escape inertness (such as modal dialogs) 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
+
An inert subtree should not contain any content or controls which are critical to
+ understanding or using aspects of the page which are not in the inert state. Content in an inert
+ subtree will not be perceivable by all users, or interactive. Authors should not specify elements
+ as inert unless the content they represent are also visually obscured in some way. In most cases,
+ authors should not specify the inert
attribute on individual form controls. In these
+ instances, the disabled
attribute is probably more
appropriate.
The inert
IDL attribute must reflect
- the content attribute of the same name.
The following example shows how to mark partially loaded content, visually obscured by a + "loading" message, as inert.
+ +<section aria-labelledby=s1>
+ <h3 id=s1>Population by City</h3>
+ <div class=container>
+ <div class=loading><p>Loading...</p></div>
+ <div inert>
+ <form>
+ <fieldset>
+ <legend>Date range</legend>
+ <div>
+ <label for=start>Start</label>
+ <input type=date id=start>
+ </div>
+ <div>
+ <label for=end>End</label>
+ <input type=date id=end>
+ </div>
+ <div>
+ <button>Apply</button>
+ </div>
+ </fieldset>
+ </form>
+ <table>
+ <caption>From 20-- to 20--</caption>
+ <thead>
+ <tr>
+ <th>City</th>
+ <th>State</th>
+ <th>20-- Population</th>
+ <th>20-- Population</th>
+ <th>Percentage change</th>
+ </tr>
+ </thead>
+ <tbody>
+ <!-- ... -->
+ </tbody>
+ </table>
+ </div>
+ </div>
+</section>
+
+ The "loading" overlay obscures the inert content, making it visually apparent that the inert
+ content is not presently accessible. Notice that the heading and "loading" text are not
+ descendants of the element with the inert
attribute. This will ensure this text is
+ accessible to all users, while the inert content cannot be interacted with by anyone.
By default, there is no persistent visual indication of an element or its subtree being
+ inert. Appropriate visual styles for such content is often context-dependent. For instance, an
+ inert off-screen navigation panel would not require a default style, as its off-screen position
+ visually obscures the content. Similarly, a modal dialog
element's backdrop will
+ serve as the means to visually obscure the inert content of the web page, rather than styling
+ the inert content specifically.
However, for many other situations authors are strongly 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.
+The inert
IDL attribute must reflect
+ the content attribute of the same name.
If oldValue and value are in different states, then run the hide popover algorithm given - element, true, false, and false.
Run hide all popovers until given - ancestor's node document, ancestor, false, and - false.
If originalType is not equal to the value of element's DragEventInit : MouseEventInit {
method steps are:
Run the hide popover algorithm given this, true, false, and +
Run the hide popover algorithm given this, true, true, and true.
To hide a popover given an HTML element element, a boolean focusPreviousElement, a - boolean dontFireEvents, and a boolean throwExceptions:
+ boolean fireEvents, and a boolean throwExceptions:Run hide all popovers until given - element's node document, element, - focusPreviousElement, and dontFireEvents.
If element is not in document's auto popover list:
@@ -81590,7 +81773,7 @@ dictionary DragEventInit : MouseEventInit {Set element's popover invoker to null.
If dontFireEvents is false:
+If fireEvents is true:
Fire an event named Set element's popover visibility state to hidden. If dontFireEvents is false, then queue a popover toggle event task
+ If fireEvents is true, then queue a popover toggle event task
given element, " If this's popover visibility state is showing, and force is not present or false, then
- run the hide popover algorithm given this, true, false, and
+ run the hide popover algorithm given this, true, true, and
true. Otherwise, if force is not present or true, then run show popover
given this and true. To hide all popovers until, given a
- To hide all popovers until, given an HTML element or Let document be endpoint if endpoint is a Let closeAllOpenPopovers be an algorithm which performs the following steps: Run the hide popover algorithm given popover,
- focusPreviousElement, dontFireEvents, and false.DragEventInit : MouseEventInit {
open
", and "closed
".
- Document
document, an HTML element or
- null endpoint, a boolean focusPreviousElement, and a boolean
- dontFireEvents:Document
endpoint, a boolean
+ focusPreviousElement, and a boolean fireEvents:
+
Document
,
+ otherwise endpoint's node document.
Set popover to document's topmost auto popover.
Run the hide popover algorithm given document's auto - popover list's last element, focusPreviousElement, - dontFireEvents, and false.
If popover's popover visibility state is showing and the result of running check popover validity given popover and true is true, then run the hide popover - algorithm given popover, true, false, and false.
Otherwise, if popover's popover visibility state is DragEventInit : MouseEventInit {
a popover whose popover
attribute is in the auto state will close the popover.
Canceling popovers: When Document
has a
+
Canceling popovers: when Document
has a
topmost auto popover showing, user agents may provide a user interface that, upon
activation, queues an element task on the user
interaction task source given topmost auto popover to run the hide
- popover algorithm given the topmost auto popover, true, and false.
To light dismiss open popovers, given an Event
event:
Set document's popover pointerdown target to null.
If sameTarget is true, then run hide - all popovers until given ancestor's node document, - ancestor, false, and false.
If current is null, then return null.
If current's disowned is true, then return null.
If current's opener browsing context is null, then return null.
If the given value is null and this's browsing context is non-null, then set this's browsing - context's disowned to true.
If the given value is non-null, then return ?
OrdinaryDefineOwnProperty(this, " If a browsing context's disowned is true, its Setting Otherwise, if a browsing context's disowned is false, then scripts
- in that browsing context can use By default, scripts can access their opener browsing context's
+ The An opener origin at creation, an
origin or null, initially null. A disowned boolean, initially false. An is popup boolean, initially false. historyEntry's document's browsing context is not an auxiliary browsing
- context whose disowned is false; andopener
", {
@@ -86182,18 +86364,14 @@ dictionary WindowPostMessageOptions : StructuredSeri
window.opener
attribute is null. That prevents scripts in the
- browsing context from changing any properties of its opener browsing
- context's Window
object (i.e., the Window
object from which the
- browsing context was created).window.opener
to null clears the opener
+ browsing context reference. In practice, this prevents future scripts from accessing their
+ opener browsing context's Window
object.window.opener
to
- change properties of its opener browsing context's Window
object. For
- example, a script running in the browsing context can change the value of window.opener.location
, causing the opener browsing context to
- navigate to a completely different document.Window
object through the window.opener
getter.
+ E.g., a script can set window.opener.location
, causing the opener
+ browsing context to navigate.parent
getter steps
@@ -89363,8 +89541,6 @@ interface BeforeUnloadEvent : Event {
historyEntry's document's origin is not navigable's
targetEntry's document's browsing context is not an auxiliary browsing
- context whose disowned is false; and
targetEntry's document's origin is not oldOrigin
The boolean value of render-blocking used for the initial fetch and for fetching any imported modules. Unless otherwise stated, its value is false.
The priority used for the + initial fetch
Recall that via the import()
feature, parser metadata is "not-parser-inserted
", credentials mode is "same-origin
", and same-origin", referrer policy is the empty
- string.
auto
".
Given a request request and a script fetch options options, we define:
@@ -97252,9 +97435,11 @@ document.querySelector("button").addEventListener("click", bound); data-x="concept-request-parser-metadata">parser metadata to options's parser metadata, its referrer policy to options's referrer policy, and its + data-x="concept-script-fetch-options-referrer-policy">referrer policy, its render-blocking to options's - render-blocking. + render-blocking, and its + priority to options's + fetch priority.Set request's cryptographic nonce @@ -97267,16 +97452,19 @@ document.querySelector("button").addEventListener("click", bound); data-x="concept-request-credentials-mode">credentials mode to options's credentials mode, its referrer policy to options's referrer policy, and its + data-x="concept-script-fetch-options-referrer-policy">referrer policy, its render-blocking to options's - render-blocking.
For any given script fetch options options, the descendant script fetch options are a new script fetch options whose items all have the same values, except for the integrity metadata, which is instead the - empty string.
+ empty string, and the fetch + priority, which is instead "auto
".
not-parser-inserted
", credentials mode is credentials
- mode, and referrer
- policy is the empty string.
+ mode, referrer
+ policy is the empty string, and fetch priority is "auto
".
Fetch a single module script given url, fetch client settings @@ -103490,10 +103680,12 @@ enum DOMParserSupportedType { data-x="concept-script-fetch-options-credentials">credentials mode is initiating script's fetch options's credentials - mode, and referrer + mode, referrer policy is initiating script's fetch options's referrer policy.
+ data-x="concept-script-fetch-options-referrer-policy">referrer policy, and fetch priority is "auto
".
The effect of these options ensures that the string compilation done by
setTimeout()
and External {
height
;
referrerpolicy
;
decoding
;
- loading
+ loading
;
+ fetchpriority
@@ -128699,7 +128892,8 @@ interface External {
HTMLImageElement
integrity
;
blocking
;
color
;
- disabled
+ disabled
;
+ fetchpriority
@@ -129056,7 +129250,8 @@ interface External {
HTMLLinkElement
crossorigin
;
integrity
;
referrerpolicy
;
- blocking
+ blocking
;
+ fetchpriority
@@ -130196,6 +130391,15 @@ interface External {
"HTMLScriptElement
previous
";
"search
";
"send
"
+
+ fetchpriority
+ img
;
+ link
;
+ script
+ Sets the priority for fetches initiated by the element
+ " auto
";
+ "high
";
+ "low
"
for
label