From c8f983f04a7b2c78ffc6c2450b7a71ff876e710c Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Wed, 1 Dec 2021 12:16:59 +0100
Subject: [PATCH 01/26] Add to "Acknowledgements"
---
source | 1 +
1 file changed, 1 insertion(+)
diff --git a/source b/source
index 1848f28ff2b..3a8d07fd865 100644
--- a/source
+++ b/source
@@ -127455,6 +127455,7 @@ INSERT INTERFACES HERE
Ka-Sing Chou,
Kagami Sascha Rosylight,
Kai Hendry,
+ Kaleidea,
Kamishetty Sreeja,
呂康豪 (KangHao Lu),
Karl Dubost,
From 4c289382bdc4a1f268928ebd6c6a2338912b46cd Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 22:00:50 +0100
Subject: [PATCH 02/26] Editorial: "form element pointer" consistency (add
`data-x=""`)
Changes:
form
element pointer
->
form
element pointer
---
source | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source b/source
index 3a8d07fd865..49c0f6fc1da 100644
--- a/source
+++ b/source
@@ -115385,7 +115385,7 @@ document.body.appendChild(text);
quirks mode
form
- element ancestor (use of the form
element pointer in the parser)form
element pointer in the parser)
template
elements.Set the parser's form
element pointer to the nearest node to the
+
Set the parser's form
element pointer
+ to the nearest node to the
context element that is a form
element (going straight up the ancestor chain, and including the element itself, if it is a
form
element), if any. (If there is no such form
element, the
- form
element pointer keeps its initial value, null.)
form
element pointer keeps its initial value, null.)
form
element pointer
->
form
element pointer
---
source | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/source b/source
index 49c0f6fc1da..c665663ebe4 100644
--- a/source
+++ b/source
@@ -112440,7 +112440,7 @@ document.body.appendChild(text);
If the form
element pointer is not null, and there is
+
If the form
element pointer is not null, and there is
no template
element on the stack of open elements, then this is a
parse error; ignore the token.
Insert an HTML element for the token, and, if there is no template
element on the stack of open elements, set the form
element pointer to point to the element created.
Parse error.
If there is a template
element on the stack of open elements, or if
- the form
element pointer is not null, ignore the
+ the form
element pointer is not null, ignore the
token.
Otherwise:
Insert an HTML element for the token, and set the form
element pointer to point to the element created.
Pop that form
element off the stack of open elements.
form
elements
->
forms
the form
element
->
forms
---
source | 54 +++++++++++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/source b/source
index c665663ebe4..696f895d7a8 100644
--- a/source
+++ b/source
@@ -7592,7 +7592,7 @@ interface HTMLAllCollection {
The HTMLFormControlsCollection
interface is used for
collections of listed
- elements in form
elements.
[Exposed=Window]
interface HTMLFormControlsCollection : HTMLCollection {
@@ -23196,10 +23196,12 @@ document.body.appendChild(wbr);
beyond linking the element's node document to the resource given by the element's href
attribute.
- Similarly, for form
elements with a rel
+
Similarly, for forms
+ with a rel
attribute, links must be created for the keywords of the rel
attribute as defined for those keywords in the link types section.
- form
elements that do not have a rel
attribute,
+ forms
+ that do not have a rel
attribute,
or whose rel
attribute has no keywords that are defined as
specifying hyperlinks, must also create a hyperlink.
@@ -23831,8 +23833,8 @@ document.body.appendChild(wbr);
This is also used by form submission for
- the form
element. The exception for a
elements is for compatibility with
- web content.
a
elements is for
+ compatibility with web content.
To get an element's noopener, given an a
, area
, or
form
element element and a string target:
form
elements.form
elements; it creates a
+ form
elements; it creates an external
- resource link.form
elements; it annotates other hyperlinks created by the
- element.The rel
attribute on
- form
elements controls what kinds of links the elements create. The attribute's value
+ forms
+ controls what kinds of links the elements create. The attribute's value
must be a unordered set of unique space-separated tokens. The allowed keywords and their meanings are defined in an earlier section.
rel
's supported
tokens are the keywords defined in HTML link types which are
- allowed on form
elements, impact the processing model, and are supported by the user
+ allowed on forms,
+ impact the processing model, and are supported by the user
agent. The possible supported tokens are noreferrer
, noopener
, and opener
. rel
's HTMLLegendElement : HTMLElement {
data-x="attr-fae-form">form attribute specified to override this.
This feature allows authors to work around the lack of support for nested
- form
elements.
If a listed form-associated element has a
form
attribute specified, then that attribute's value must be
@@ -53347,7 +53351,8 @@ interface HTMLLegendElement : HTMLElement {
associations.
This example is a non-conforming document, though, as it is a violation of the content models
- to nest form
elements, and there is a parse error for the forms,
+ and there is a parse error for the
</form>
tag.
Attributes for form submission can be specified both on form
elements
+
Attributes for form submission can be specified both on
+ forms
and on submit buttons (elements that represent buttons
that submit forms, e.g. an input
element whose type
attribute is in the and that satisfy their
constraints
form
elements that are not the form owner of any elements that
+ form
elements that are the form owner of one or more elements
+ urn
on link
elementsSpecify the preferred persistent identifier using the href
attribute instead.
accept
on form
elementsaccept
on formsUse the accept
attribute directly on the input
elements instead.
hreflang
on area
@@ -125914,7 +125922,7 @@ INSERT INTERFACES HERE
formdata
FormDataEvent
- form
elements
+ form
element when it is constructing the entry list
reset
Event
- form
elements
+ form
element when it is reset
submit
SubmitEvent
- form
elements
+ form
element when it is submitted
form
element
->
form
---
source | 174 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 101 insertions(+), 73 deletions(-)
diff --git a/source b/source
index 696f895d7a8..1c4435057ef 100644
--- a/source
+++ b/source
@@ -42928,7 +42928,8 @@ interface HTMLTableCellElement : HTMLElement {
Form submissions are exposed to servers in a variety of ways, most commonly as HTTP GET or POST
requests. To specify the exact method used, the method
- attribute is specified on the form
element. This doesn't specify how the form data is
+ attribute is specified on the form.
+ This doesn't specify how the form data is
encoded, though; to specify that, you use the enctype
attribute. You also have to specify the URL of the service that will handle the
submitted data, using the action
attribute.
Denotes elements that can be used for constructing the entry list when a
- form
element is submitted.
Denotes elements that can be affected when a form
element is reset.
Denotes elements that can be affected when a form is + reset.
HTMLFormElement
.The form
element represents a hyperlink that can be
+
A form + represents a hyperlink that can be manipulated through a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing.
@@ -43610,10 +43613,10 @@ interface HTMLFormElement : HTMLElement {The elements
IDL attribute must return an HTMLFormControlsCollection
rooted at the
- form
element's root, whose filter matches form's root, whose filter matches listed elements whose form owner is the
- form
element, with the exception of input
elements whose type
attribute is in the form, with the exception of input
elements whose
+ type
attribute is in the Image Button state, which must, for historical reasons, be
excluded from this particular collection.
To determine the value of an indexed property for a
- form
element, the user agent must return the value returned by the form,
+ the user agent must return the value returned by the
item
method on the elements
collection, when invoked with the given index as its
argument.
Each Each form
+ has a mapping of names to elements called the past names
map. It is used to persist names of controls even when they change names. The supported property names consist of the names obtained from the following
@@ -43647,7 +43652,8 @@ interface HTMLFormElement : HTMLElement {
For each listed element candidate
- whose form owner is the For each form
element has a mapping of names to elements called the past names
+ form
element, with the exception of any
+ whose form owner is the form,
+ with the exception of any
input
elements whose type
attribute is in the
Image Button state:img
element candidate whose form owner is the
- form
element:
To determine the value of a named property name
- for a form
element, the user agent must run the following steps:
Let candidates be a live If candidates is empty, let candidates be a live
If candidates is empty, name is the name of one of
- the entries in the RadioNodeList
object
containing all the listed elements, whose form
- owner is the form
element, that have either an is the form, that have either an
id
attribute or a name
attribute equal
to name, with the exception of input
elements whose type
attribute is in the HTMLFormElement : HTMLElement {
RadioNodeList
object containing all the img
elements, whose form
- owner is the form
element, that have either an is the form, that have either an
id
attribute or a name
attribute
equal to name, in tree order.form
element's past names map: return the object
- associated with name in that map.
If candidates contains more than one node, return candidates.
Return the node in candidates.
If an element listed in a form
element's past names map changes
+
If an element listed in a form's + past names map changes form owner, then its entries must be removed from that map.
-Otherwise, if element has an ancestor Otherwise, if element has an ancestor
+ form, then associate element with the nearest such
- ancestor form
element, then form
element.
The name
content attribute gives the name of the form control, as
- used in form submission and in the form
element's form submission and in the form's
elements
object. If the attribute is specified, its value must
not be the empty string or isindex
.
formnovalidate
, and formtarget
. When omitted, they default to the values given on
- the corresponding attributes on the form
element.
+ the corresponding attributes on the form.
A form
element's default button is the first A form's default button is the first submit button in tree order whose form
- owner is that form
element.
If the user agent supports letting the user submit a form implicitly (for example, on some
platforms hitting the "enter" key while a text control is focused implicitly submits
@@ -56714,8 +56731,9 @@ fur
element from the form
element itself otherwise.
For the purpose of the previous paragraph, an element is a field that blocks implicit
- submission of a Each Each form has a constructing entry list
+ boolean, initially false. Each Each form has a firing submission events
+ boolean, initially false. When a Each Each form
+ has a planned navigation, which is either null or a
task; when the form
element if it is an input
element whose
- form owner is that form
element and whose of a form
+ if it is an
input
element whose
+ form owner is that form and whose type
attribute is in one of the following states:
Text,
Search,
@@ -56738,11 +56756,11 @@ fur
Form submission algorithm
- form
element has a constructing entry list boolean, initially
- false.form
element has a firing submission events boolean, initially
- false.form
element form is submitted from an element submitter
@@ -56923,7 +56941,8 @@ fur
defining this, act in a manner analogous to that defined in this specification for similar
schemes.form
element has a planned navigation, which is either null or a
+ form
is first created, its
planned navigation must be set to null. In the behaviors described below, when the
user agent is required to plan to navigate to a particular resource destination, it must run the following steps:
If the If the form's
+ link types include the form
element's link types include the noreferrer
keyword, then set destination's referrer to "no-referrer
".
Queue an element task on the DOM manipulation task source given
- the form
element and the following steps:
Set the form
's planned navigation to null.
Let encoding be the document's character encoding.
If the form
element has an If the form has an
accept-charset
attribute, set encoding to
the return value of running these substeps:
Let input be the value of the Let input be the value of the form's form
element's accept-charset
attribute.
Let candidate encoding labels be the result of If element is a form-associated custom element, then:
Reset the form owner of element. If element is
- associated with a form
element, then
+ associated with a form, then
enqueue a custom element callback reaction with element, callback
name "formAssociatedCallback
", and « the associated form
».
Similarly, a canvas
element with the hidden
attribute could be used by a scripted graphics engine as an off-screen buffer, and a form control
- could refer to a hidden form
element using its form using its
form
attribute.
The autocapitalize
attribute can be used on an editing host to control autocapitalization behavior for the hosted
editable region, on an input
or textarea
element to control the behavior
- for inputting text into that element, or on a form
element to control the default
+ for inputting text into that element, or on a form
+ to control the default
behavior for all autocapitalize-inheriting elements
- associated with the form
element.
+ associated with the form.
The Returns the current autocapitalization state for the element, or an empty string if it hasn't
been set. Note that for autocapitalize
attribute never causes
autocapitalization to be enabled for input
elements whose
input
and textarea
elements that inherit their
- state from a form
element, this will return the autocapitalization state of the
- form
element, but for an element in an editable region, this will not return the
- autocapitalization state of the editing host (unless this element is, in fact, the editing
- host).
Can be set, to set the autocapitalize
content
attribute (and thereby change the autocapitalization behavior for the element).
form
element
pointer, then associate element
- with the form
element pointed to by the form
element
+ with the form pointed to by the
+ form
element
pointer and set element's parser inserted flag.
Return element.
If the stack of open elements does not have a form
element in scope, then this is a parse
- error; return and ignore the token.
Generate implied end tags.
If the current node is not a form
element, then this is a
- parse error.
If the current node is not a form, + then this is a parse error.
Pop elements from the stack of open elements until a form
element has been popped from the stack.
Insert an HTML element for the token, and set the form
element pointer to point to the element created.
Pop that form
element off the stack of open elements.
Pop that form off the + stack of open elements.
html
head
body
form
id
="outer
"div
form
id
="inner
"input
The input
element will be associated with the inner form
element.
+
The input
element will be associated with the inner
+ form.
Now, if this tree structure is serialized and reparsed, the <form
id="inner">
start tag will be ignored, and so the input
element will be
- associated with the outer form
element instead.
<html><head></head><body><form id="outer"><div><form id="inner"><input></form></div></form></body></html>
@@ -116186,7 +116210,8 @@ console.assert(container.firstChild instanceof SuperP);
to the nearest node to the
context element that is a form
element (going straight up the ancestor chain, and including the element itself, if it is a
- form
element), if any. (If there is no such form
element, the
+ form), if any. (If there is no such
+ form, the
form
element pointer keeps its initial value, null.)
@@ -124129,7 +124154,7 @@ interface External {
select
;
textarea
;
form-associated custom elements
- form
element
+ formaction
@@ -125923,7 +125948,8 @@ INSERT INTERFACES HERE
formdata
FormDataEvent
form
element when it is constructing the entry list
+ hashchange
@@ -126026,7 +126052,8 @@ INSERT INTERFACES HERE
reset
Event
form
element when it is reset
+ securitypolicyviolation
@@ -126056,7 +126083,8 @@ INSERT INTERFACES HERE
submit
SubmitEvent
form
element when it is submitted
+ toggle
From 185550fdc13ff51a4923d17537439fcc4b45b8fa Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Mon, 22 Nov 2021 11:43:35 +0100
Subject: [PATCH 06/26] Editorial: "form element" -> "form" (linewrapped, 8
changes)
Changes:
form
element
->
form
form
elements
->
forms
---
source | 42 ++++++++++++++++++++++++------------------
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/source b/source
index 1c4435057ef..d40a94f35ae 100644
--- a/source
+++ b/source
@@ -43737,9 +43737,9 @@ interface HTMLFormElement : HTMLElement {
If candidates contains more than one node, return candidates.
Otherwise, candidates contains exactly one node. Add a mapping from
- name to the node in candidates in the form
- element's past names map, replacing the previous entry with the same name, if
- any.
Return the node in candidates.
A form-associated element can have a relationship with a A form-associated element can have a relationship with a
+ form,
+ which is called the element's form owner. If a form-associated
element is not associated with a form,
its form owner is said to be null. The rules in this section are complicated by the fact that although conforming
- documents or trees will never contain nested The attributes for form submission that may be specified on If a user agent is to interactively validate the constraints of If a user agent is to interactively validate the constraints of
+ form
+ form, then the user agent must run the following steps: Statically validate the constraints of form, and let
@@ -56727,8 +56731,9 @@ fur
If the form has
no submit button, then the implicit submission
mechanism must do nothing if the form has more than one field that blocks implicit
- submission, and must submit the For the purpose of the previous paragraph, an element is a field that blocks implicit
submission of a form
@@ -115415,8 +115420,9 @@ document.body.appendChild(text);
Set the parser's When the user agent is required to statically validate the constraints of
- Each form has a firing submission events
boolean, initially false. When a When a Returns the element's Returns the element's form owner, if any, or null otherwise. Returns the element's Returns the element's form owner, if any, or null otherwise. The The The In this example, a Each form
has a planned navigation, which is either null or a
- task; when the If the If the form has a non-null
+ planned navigation, remove it from its task queue. Queue an element task on the DOM manipulation task source given
the form and the following steps: Set the Set the form's
+ planned navigation to null. Navigate target browsing context to
destination, with historyHandling set to
@@ -56981,8 +56987,8 @@ fur
Set the Set the form's planned navigation
+ to the just-queued task. The behaviors are as follows: Returns a You can use the custom element Reset the form owner of element. If element is
associated with a form, then
enqueue a custom element callback reaction with element, callback
- name " If element is disabled, then
enqueue a custom element callback reaction with element, callback name
From 48093cfc48ddaefb95784b82696e46fde4a01ac4 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Fri, 19 Nov 2021 10:33:35 +0100
Subject: [PATCH 10/26] Editorial: "form element" -> "form (form or search
element)"
Changes:
A form-associated element has an associated parser inserted flag. A form-associated element is, by default, associated with its nearest ancestor The If the current node is not a form,
then this is a parse error. Pop elements from the stack of open elements until a Pop elements from the stack of open elements until a
+ form ( the value of the If there are multiple To get an element's target, given an To get an element's target, given an If element has a Links are a conceptual construct, created by To get an element's noopener, given an To get an element's noopener, given an If element's link types include the To determine which link types apply to a The The For The The The The The The The The The The The The One of the following: Returns an Returns an The The A form is a component of a web page that has form controls, such as text, buttons, checkboxes,
- range, or color picker controls. A user can interact with such a form, providing data that can
- then be sent to the server for further processing (e.g. returning the results of a search or
+ A form is a component of a web page that groups form controls, such as text, buttons,
+ checkboxes, range, or color picker controls. A user can interact with the form controls,
+ inputting data. The form can submit all the data in its form controls in one batch to the
+ server for further processing (e.g. returning the results of a search or
calculation). No client-side scripting is needed in many cases, though an API is available so that
scripts can augment the user experience or use forms for purposes other than submitting data to a
server. In this section form
+ refers to either a In this section form
+ refers to either a Most form controls have a value and a HTMLLegendElement : HTMLElement {
In this section form
+ refers to either a The In this section form
+ refers to either a A submittable element is a candidate for constraint
@@ -56687,6 +56696,9 @@ interface ValidityState {
In this section form
+ refers to either a In this section form
+ refers to either a When a form form is reset, run these steps: In this section form
+ refers to either a Adding a static In this section form
+ refers to either a A form's default button is the first submit button in tree order whose form
owner is that form. In this section form
+ refers to either a Each form has a constructing entry list
boolean, initially false. In this section form
+ refers to either a If the user agent is to pick an encoding for a
form, it must run the following steps: A the value of the A form is either a A form is a component of a web page that groups form controls, such as text, buttons,
@@ -42748,7 +42750,9 @@ interface HTMLTableCellElement : HTMLElement {
For the purposes of this brief introduction, we will create a pizza ordering form. Any form starts with a Any form
+ starts with a The The The The action of an element is the value of the element's
In addition, the following The The If the The It's not appropriate to use the In the following example, the author is including a search form within the
+ In this example, the author has implemented their web application's search functionality
+ entirely with JavaScript. There is no use of the In the following example, the page has two search features. The first is located in the
+ web page's form
- element, which is called the element's form owner. If a form-associated
+ form
- elements, it is quite possible (e.g., using a script that performs DOM manipulation) to generate
+ documents or trees will never contain a nested
+ form,
+ it is quite possible (e.g., using a script that performs DOM manipulation) to generate
trees that have such nested elements. They are also complicated by
rules in the HTML parser that, for historical reasons, can result in a form-associated
element being associated with a form
@@ -53645,8 +53647,9 @@ form.method === input; // => true
data-x="attr-input-type">type attribute is in the Submit Button state).
- form
- elements are action
, The attributes for form submission that may be specified on
+ forms
+ are
action
, enctype
, method
, novalidate
, and target
.form
- element form, then the user agent must run the following steps:
form
- element from the form
element itself otherwise.form
- element ancestor (use of the form
element pointer in the parser)form
element pointer in the parser)template
elements.form
element pointer
- to the nearest node to the
- context element that is a form
- element (going straight up the ancestor chain, and including the element itself, if it is a
+ to the nearest node to the context
+ element that is a form
+ (going straight up the ancestor chain, and including the element itself, if it is a
form), if any. (If there is no such
form, the
form
element pointer keeps its initial value, null.)form
element form
->
form form
---
source | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source b/source
index d40a94f35ae..9df08f50d8e 100644
--- a/source
+++ b/source
@@ -56235,7 +56235,8 @@ control.setSelectionRange(oldStart + prefix.length, oldEnd + prefix.length, oldD
Constraint validation
form
element form, it must run the following steps, which return
+ a form
+ form, it must run the following steps, which return
either a positive result (all the controls in the form are valid) or a negative
result (there are invalid controls) along with a (possibly empty) list of elements that are
invalid and for which no script has claimed responsibility:form
element form is When a form form is submitted from an element submitter
(typically a button), optionally with a submitted from submit()
method flag set, the user agent must run the
@@ -57657,7 +57658,7 @@ dictionary FormDataEventInit : EventInit {
Resetting a form
- form
element form is When a form form is reset, run these steps:
From 9eea2a74653f4763c3cd1b2bbc4876b5ffe3a3ff Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Fri, 19 Nov 2021 10:33:57 +0100
Subject: [PATCH 08/26] Editorial: "form element" -> "form owner"
Changes:
form
element
->
form owner
---
source | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source b/source
index 9df08f50d8e..822dc14ad22 100644
--- a/source
+++ b/source
@@ -51533,7 +51533,7 @@ interface HTMLOptionElement : HTMLElement {
option.form
form
element, if any, or null otherwise.option.text
legend.form
form
element, if any, or null otherwise.form
-> form (13
changes)
Changes:
form
->
form
---
source | 43 +++++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/source b/source
index 822dc14ad22..f0e8b6a78f4 100644
--- a/source
+++ b/source
@@ -24350,7 +24350,7 @@ document.body.appendChild(wbr);
@@ -43466,7 +43466,8 @@ interface HTMLFormElement : HTMLElement {
case-insensitive match for "link
- a
and area
+ form
form
UTF-8
".
name
attribute
- represents the form
's name within the forms
+ represents the form's
+ name within the forms
collection. The value must not be the empty string, and the value must be unique amongst the
form
elements in the forms
collection that
it is in, if any.
submit()
- method, when invoked, must submit the form
- element from the form
element itself, with the submitted from submit the
+ form from the form
+ itself, with the submitted from
submit()
method flag set. true
dialog
, mapping to the state dialog, indicating that submitting the form
is
+ data-x="attr-fs-method-dialog">dialogdialog
box in which the form finds itself, if any, and
otherwise not submit.
@@ -53742,7 +53745,8 @@ form.method === input; // => true
form
is used with a dialog
. The In this example, a form
+ is used with a
dialog
. The method
attribute's "dialog
" keyword is used to have the dialog
automatically close when the form is submitted.form
is first created, its
+ task; when the
+ form is first created, its
planned navigation must be set to null. In the behaviors described below, when the
user agent is required to plan to navigate to a particular resource destination, it must run the following steps:no-referrer
".
- form
has a non-null planned navigation, remove it from
- its task queue.
-
form
's planned navigation to null.form
's planned navigation to the just-queued task.FormData
object representing names and values of elements associated
- to the target form
. Operations on the FormData
object will affect form
- data to be submitted.FormData
+ object will affect form data to be submitted.
FormData
object associated to the entry
list that is constructed when the
- form
is submitted.
+ form is submitted.
Resetting a form
@@ -67753,7 +67759,8 @@ customElements.define('my-checkbox', MyCheckbox);
my-checkbox
like a built-in
form-associated element. For example, putting it in form
or label
associates the my-checkbox
element with them, and submitting the
- form
will send data provided by my-checkbox
implementation.
+ form
+ will send data provided by my-checkbox
implementation.
<form action="..." method="...">
@@ -69010,8 +69017,8 @@ customElements.define("x-foo", class extends HTMLElement {
formAssociatedCallback
", and « the associated form
- ».formAssociatedCallback
", and « the associated
+ form ».form
element
->
form (search
element)
---
source | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/source b/source
index f0e8b6a78f4..9a8cf34a349 100644
--- a/source
+++ b/source
@@ -53236,7 +53236,8 @@ interface HTMLLegendElement : HTMLElement {
form
element (as described
+ w-nodev>nearest ancestor form (form
+ or search
element) (as described
below), but, if it is listed, may have a form
attribute specified to override this.form
content attribute is not present
- form
element
+ form
or search
element
ancestor after the change to the ancestor chain
@@ -108555,7 +108557,8 @@ dictionary StorageEventInit : EventInit {
head
element pointer gets set to point to this node.form
element pointer points to the last
- form
element that was opened and whose end tag has not yet been seen. It is used to
+ form (form
or search
element)
+ that was opened and whose end tag has not yet been seen. It is used to
make form controls associate with forms in the face of dramatically bad markup, for historical
reasons. It is ignored inside template
elements.form
- element has been popped from the stack.form
or search
element)
+ has been popped from the stack.form
,
->
form
, search
,
, or form
->
form
, or search
---
source | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/source b/source
index 9a8cf34a349..1bd94bae893 100644
--- a/source
+++ b/source
@@ -9975,7 +9975,8 @@ partial interface Document {
name
content attribute for all
exposed embed
, form
, iframe
,
- img
, and exposed object
elements that have a non-empty
+ img
, search
,
+ and exposed object
elements that have a non-empty
name
content attribute and are in a document tree with
document as their root;
embed
, form
, iframe
,
- img
, or exposed object
elements that have a img
, search
,
+ and exposed object
elements that have a name
content attribute whose value is name, orobject
elements that have an HTMLBaseElement : HTMLElement {
base
elements with target
attributes, all but the first are ignored.a
, area
, or
- form
element element, run these steps:
+ a
, area
,
+ form
, or search
element element, run these steps:
target
attribute, then return that
@@ -23158,7 +23160,8 @@ document.body.appendChild(wbr);Introduction
a
, area
,
- form
, and link
elements, that represent
+ form
, search
,
+ and link
elements, that represent
a connection between two resources, one of which is the current Document
. There are
two kinds of links in HTML:a
elements is for
compatibility with web content.
- a
, area
, or
- form
element element and a string target:a
, area
,
+ form
, or search
+ element element and a string target:
link
, a
, area
,
- or form
element, the element's rel
attribute must be form, or search
element,
+ the element's rel
attribute must be split on ASCII whitespace. The resulting tokens
are the keywords for the link types that apply to that element.form
->
form
, and search
form
->
form
and search
---
source | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/source b/source
index 1bd94bae893..b97a8054e29 100644
--- a/source
+++ b/source
@@ -24803,7 +24803,8 @@ document.body.appendChild(wbr);
external
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).help
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
+ a
, area
, form
, and search
+ elements. This keyword creates a
hyperlink.a
, area
, and form
elements, the For
a
, area
, form
, and search
+ elements, the help
keyword indicates that the referenced document provides further help
information for the parent of the element defining the hyperlink, and its children.license
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
+ a
, area
, form
, and search
+ elements. This keyword creates a
hyperlink.license
keyword indicates that the referenced document
@@ -25304,7 +25308,8 @@ document.body.appendChild(wbr);
data-x="rel-nofollow">nofollow"
nofollow
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).noopener
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).noreferrer
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).opener
keyword may be used with a
,
- area
, and form
elements. This keyword does not create a
+ area
, form
, and search
+ elements. This keyword does not create a
hyperlink, but annotates any other
hyperlinks created by the element (the implied hyperlink, if no other keywords create one).search
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
search
keyword indicates that the referenced document
provides an interface specifically for searching the document and its related resources.next
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
next
keyword indicates that the document is part of a
sequence, and that the link is leading to the document that is the next logical document in the
@@ -25977,8 +25985,8 @@ document.body.appendChild(wbr);
data-x="rel-prev">prev"
prev
keyword may be used with link
,
- a
, area
, and form
elements. This keyword creates a
- hyperlink.a
, area
, form
, and search
+ elements. This keyword creates a hyperlink.
prev
keyword indicates that the document is part of a
sequence, and that the link is leading to the document that is the previous logical document in
@@ -26066,7 +26074,7 @@ document.body.appendChild(wbr);
- form
form
and search
form
elements
->
forms (form
or search
elements)
---
source | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source b/source
index b97a8054e29..e81866e5f03 100644
--- a/source
+++ b/source
@@ -9863,8 +9863,8 @@ partial interface Document {
document.forms
HTMLCollection
of the form
elements in the
- Document
.HTMLCollection
of the forms
+ (form
or search
elements) in the Document
.document.scripts
forms
attribute must return an HTMLCollection
rooted at the Document
node,
- whose filter matches only form
elements.form
or search
elements).
scripts
attribute must return an HTMLCollection
rooted at the Document
node,
From 53d4be41c407f99a38d80cabd6c0e44f63859c45 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Mon, 22 Nov 2021 19:23:45 +0100
Subject: [PATCH 14/26] Editorial: Clarify form's non-normative explainer
---
source | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source b/source
index e81866e5f03..2b886aa2a6b 100644
--- a/source
+++ b/source
@@ -42726,9 +42726,10 @@ interface HTMLTableCellElement : HTMLElement {
- Form-associated custom elements
+ form
or a search
element.
internals.setFormValue(value)
Form control infrastructure
+ form
or a search
element.A form control's value
Attributes common to form controls
+ form
or a search
element.Naming form controls: the
name
attribute
+
+ form
or a search
element.Definitions
form
or a search
element.Introduction
Resetting a form
+ form
or a search
element.form
or a search
element.formAssociated
property, with a true value, makes an
autonomous custom element a form-associated custom element. The
ElementInternals
interface helps you to implement functions and properties common
From a13169afa3baa492be653099964e64e122bb43bf Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Mon, 22 Nov 2021 11:30:16 +0100
Subject: [PATCH 17/26] [optional] Editorial: Add "form or search" note to some
"Form" sub-subsections
In this section form refers to either a `form` or a `search` element.
---
source | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/source b/source
index 3600266e19e..8e27d9ca023 100644
--- a/source
+++ b/source
@@ -56748,6 +56748,9 @@ fur
Implicit submission
+ form
or a search
element.Form submission algorithm
+ form
or a search
element.Selecting a form submission encoding
+ form
or a search
element.s
samp
script
search
section
select
slot
s
samp
script
search
section
select
slot
ruby
s
samp
search
section
select
small
s
;
samp
;
script
;
+ search
;
section
;
select
;
slot
;
@@ -123889,6 +123892,7 @@ interface External {
ruby
;
s
;
samp
;
+ search
;
section
;
select
;
small
;
From 01d100692ec5d5074bb0f66cadec41fb3736e8eb Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Fri, 19 Nov 2021 08:46:53 +0100
Subject: [PATCH 19/26] Add the p
element's end tag may be omitted if the
p
element is immediately followed by an address
, article
,
aside
, blockquote
, details
, div
, dl
,
- fieldset
, figcaption
, figure
, footer
, form
, h1
, h2
,
+ fieldset
, figcaption
, figure
, footer
,
+ form
, h1
, h2
,
h3
, h4
, h5
, h6
, header
,
hgroup
, hr
, main
, menu
, nav
,
- ol
, p
, pre
, section
, table
, or
+ ol
, p
, pre
,
+ search
, section
, table
, or
ul
element, or if there is no more content in the parent element and the parent
element is an HTML element that is not an a
,
audio
, del
, ins
, map
, noscript
,
@@ -108358,7 +108360,8 @@ dictionary StorageEventInit : EventInit {
listing
, main
, marquee
, menu
,
meta
, nav
, noembed
, noframes
,
noscript
, object
, ol
, p
, param
,
- plaintext
, pre
, script
, section
,
+ plaintext
, pre
, script
,
+ search
, section
,
select
, source
, style
, summary
,
table
, tbody
, td
, template
,
textarea
, tfoot
, th
, thead
,
From 51e1c5c4d9a75bf4bf57d087db1499094ef0ce59 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 12:11:35 +0100
Subject: [PATCH 20/26] Add the map
,
meta
,
object
,
+ search
,
select
, and
textarea
name
content attribute for all embed
,
- form
, img
, and object
elements that
+ form
, search
, img
, and object
elements that
have a non-empty name
content attribute and are in a document
tree with window's associated
Document
as their root; andDocument
whose name is
name;
- embed
, form
, img
, or
+ embed
, form
, search
, img
, or
object
elements that have a name
content attribute whose
value is name and are in a document tree with window's associated Document
as their
@@ -116958,7 +116959,7 @@ html, body { display: block; }
@namespace url(http://www.w3.org/1999/xhtml);
address, blockquote, center, dialog, div, figure, figcaption, footer, form,
-header, hr, legend, listing, main, p, plaintext, pre, xmp {
+header, hr, legend, listing, main, p, plaintext, pre, search, xmp {
display: block;
}
From 8a6b580a16783533be17c44dcc298495c784dad0 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Fri, 19 Nov 2021 10:44:56 +0100
Subject: [PATCH 21/26] Add the
form
element
->
Any form starts with a form
or search
element
expected
->
expected, but not as a descendant of another form
or search
element.
form
element
->
form
or search
element
form
elements
->
form
and search
elements
---
source | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/source b/source
index 013e9d42034..9e27b24a815 100644
--- a/source
+++ b/source
@@ -42727,6 +42727,8 @@ interface HTMLTableCellElement : HTMLElement {
Introduction
+ form
or a search
element.form
element, inside which are placed the controls. Most
+ form
or search
element,
+ which then contains among others form-associated elements. Most
controls are represented by the input
element, which by default provides a text
control. To label a control, the label
element is used; the label text and the
control itself go inside the label
element. Each part of a form is considered a
@@ -43419,9 +43423,11 @@ interface HTMLTableCellElement : HTMLElement {
form
or search
element.form
element descendants.form
or search
element
+ descendants.accept-charset
forms
collection. The value must not be the empty string, and the value must be unique amongst the
- form
elements in the forms
collection that
- it is in, if any.
+ form
and search
elements in the
+ forms
collection that it is in, if any.
autocomplete
attribute is an enumerated
From 2580dec9b1a6858200d2bbc664ca7d47be7e205a Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 13:30:12 +0100
Subject: [PATCH 22/26] Add the
+ HTMLScriptElement
+
+
+ search
Form container for search controls, optionally user-submittable
+ flow;
+ palpable
+ flow
+ flow
+ globals;
+ form attributes;
+ action
;
+
+ HTMLFormElement
section
Generic document or application section
From d80e00e8932e5614ee120525794e6c0aa077a54b Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 13:33:14 +0100
Subject: [PATCH 23/26] Add the samp
HTMLElement
+
+ search
+ HTMLFormElement
+
script
HTMLScriptElement
: HTMLElement
From 66dba167ffa5923fcdeccdfbbd837f640d84f37d Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Mon, 22 Nov 2021 13:50:16 +0100
Subject: [PATCH 24/26] Add the Ordered set of unique space-separated tokens, none of which are identical to another, each consisting of one code point in length
action
- form
+ form
;
+ search
URL to use for form submission
- Valid non-empty URL potentially surrounded by spaces
+ Valid non-empty URL potentially surrounded by spaces, can be empty for search
element
allow
iframe
@@ -124028,7 +124029,8 @@ interface External {
"characters
"
autocomplete
- form
+ form
;
+ search
Default setting for autofill feature for controls in the form
" on
"; "off
"
@@ -124210,7 +124212,8 @@ interface External {
" true
"; "false
"
enctype
- form
+ form
;
+ search
Entry list encoding type to use for form submission
" application/x-www-form-urlencoded
"; "multipart/form-data
"; "text/plain
"
@@ -124476,7 +124479,8 @@ interface External {
Valid media query list
method
- form
+ form
;
+ search
Variant to use for form submission
" GET
";
"POST
";
@@ -124522,7 +124526,8 @@ interface External {
Text*
name
- form
+ form
;
+ search
Name of form to use in the document.forms
API
Text*
@@ -124563,7 +124568,8 @@ interface External {
Text
novalidate
- form
+ form
;
+ search
Bypass form control validation for form submission
Boolean attribute
@@ -124803,7 +124809,8 @@ interface External {
Valid browsing context name or keyword
target
- form
+ form
;
+ search
Browsing context for form submission
Valid browsing context name or keyword
From 7cf5e5742e8d65eb8d6dd73a8a05de3b1b079f52 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 15:04:35 +0100
Subject: [PATCH 25/26] Add action
and
formaction
- content attributes, if specified, must have a value that is a valid non-empty URL
+ content attributes of a form
or button
, if specified,
+ must have a value that is a valid non-empty URL
potentially surrounded by spaces.action
+ content attribute of a search
element, if specified,
+ must have a value that is a valid URL potentially surrounded by spaces.
+ If not specified, the search
element disables form submission.formaction
attribute, if the element is a submit button and has such an attribute, or the value of its
From 0e6833b5f926b67654961dd86f7578a287197895 Mon Sep 17 00:00:00 2001
From: Kaleidea <74888177+Kaleidea@users.noreply.github.com>
Date: Sun, 14 Nov 2021 15:01:26 +0100
Subject: [PATCH 26/26] Add "The search element" section
Defines:
- attr-aria-role-search
Credit for the explainer and examples:
@scottaohara
---
source | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 127 insertions(+)
diff --git a/source b/source
index 3876bc90afc..13dbc094c63 100644
--- a/source
+++ b/source
@@ -3922,6 +3922,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
button
presentation
search
aria-*
content
@@ -43879,6 +43880,132 @@ interface HTMLFormElement : HTMLElement {
+ The
+
+ search
element
+
+
+ form
or search
element.form
or search
element
+ descendants.action
— URL to use for
+ form submission or unspecified to disable form submissionHTMLFormElement
, as defined for form
elements.search
element represents a part of a document or application
+ that contains a set of form controls or other content related to performing a search or filtering
+ operation. This could be a search of the web site or application; a way of searching or filtering
+ search results on the current web page; or a global or Internet-wide search function.search
element is almost identical to the form
+ element with the following differences:
+
+
+ action
attribute is unspecified then
+ form submission is disabled, only the
+ submit event
is fired.search
element has the search
+ role
, screen readers announce it as the "search landmark" when focus navigates into it.search
element just for presenting
+ search results, though suggestions and links as part of "quick search" results can be
+ included as part of a search feature. Rather, a returned web page of search results would instead
+ be expected to be presented as part of the main content of that web page.header
of the web page:
+ <header>
+ <h1><a href="/">My fancy blog</a></h1>
+ ...
+ <search action="search.php">
+ <label for="query">Find an article</label>
+ <input id="query" name="q" type="search">
+ <button type="submit">Go!</button>
+ </search>
+</header>
action
attribute to perform
+ server-side submission. The containing search
element semantically identifies
+ the purpose of the descendant content as representing search capabilities.
+ <search>
+ <label>
+ Find and filter your query
+ <input type="search" id="query">
+ </label>
+ <label>
+ <input type="checkbox" id="exact-only">
+ Exact matches only
+ </label>
+
+ <section>
+ <h3>Results found:</h3>
+ <ul id="results">
+ <li>
+ <p><a href="services/consulting">Consulting services</a></p>
+ <p>
+ Find out how we can help you improve your business with our integrated consultants, Bob and Rob.
+ </p>
+ </li>
+ ...
+ </ul>
+ <!--
+ when a query returns or filters out all results
+ render the no results message here
+ -->
+ <output id="no-results"></output>
+ </section>
+</search>
header
and serves as a global mechanism to search the web site's
+ content. Its purpose is indicated by its specified title
attribute. The results
+ are presented on a new page at the URL set by the action
+ attribute. The second search is included as part of the main content of the page, as it
+ represents a mechanism to search and filter the content of the current page without loading a
+ new page. It contains a heading to indicate its purpose.
+ <body>
+ <header>
+ ...
+ <search title="Website" action="/search">
+ ...
+ </search>
+ </header>
+ <main>
+ <h1>Hotels near your location</h1>
+ <search>
+ <h2>Filter results</h2>
+ ...
+ </search>
+ <article>
+ <!-- search result content -->
+ </article>
+ </main>
+</body>
The
label
element