@@ -51780,17 +51780,18 @@ You cannot submit this form when the field is incorrect.</samp></pre>
51780
51780
51781
51781
<p>For <code>input</code> elements without a defined <span>input activation behavior</span>, but
51782
51782
to which these events <span data-x="concept-input-apply">apply</span>, and for which the user
51783
- interface involves both interactive manipulation and an explicit commit action, then when the user
51784
- changes the element's <span data-x="concept-fe-value">value</span>, the user agent must
51783
+ interface involves both interactive manipulation and an explicit commit action, then when the
51784
+ user changes the element's <span data-x="concept-fe-value">value</span>, the user agent must
51785
51785
<span>queue an element task</span> on the <span>user interaction task source</span> given the
51786
51786
<code>input</code> element to <span data-x="concept-event-fire">fire an event</span> named <code
51787
51787
data-x="event-input">input</code> at the <code>input</code> element, with the <code
51788
51788
data-x="dom-Event-bubbles">bubbles</code> and <code data-x="dom-Event-composed">composed</code>
51789
51789
attributes initialized to true, and any time the user commits the change, the user agent must
51790
51790
<span>queue an element task</span> on the <span>user interaction task source</span> given the
51791
- <code>input</code> element to <span data-x="concept-event-fire">fire an event</span> named <code
51792
- data-x="event-change">change</code> at the <code>input</code> element, with the <code
51793
- data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p>
51791
+ <code>input</code> element to set its <span>user interacted</span> to true and <span
51792
+ data-x="concept-event-fire">fire an event</span> named <code data-x="event-change">change</code>
51793
+ at the <code>input</code> element, with the <code data-x="dom-Event-bubbles">bubbles</code>
51794
+ attribute initialized to true.</p>
51794
51795
51795
51796
<p class="example">An example of a user interface involving both interactive manipulation and a
51796
51797
commit action would be a <span data-x="attr-input-type-range">Range</span> controls that use a
@@ -54673,6 +54674,9 @@ interface <dfn interface>HTMLLegendElement</dfn> : <span>HTMLElement</span> {
54673
54674
default value. If it is false, <span data-x="concept-fe-value">value</span> mirrors the default
54674
54675
value. If it is true, the default value is ignored.</p>
54675
54676
54677
+ <p><code>input</code> and <code>textarea</code> elements have a <dfn>user interacted</dfn> (a boolean).
54678
+ It is initially set to false.</p>
54679
+
54676
54680
<p>To define the behavior of constraint validation in the face of the <code>input</code>
54677
54681
element's <code data-x="attr-input-multiple">multiple</code> attribute, <code>input</code> elements
54678
54682
can also have separately defined <dfn data-x="concept-fe-values">value<em>s</em></dfn>.</p>
@@ -58731,8 +58735,8 @@ fur
58731
58735
58732
58736
<p>The algorithm to <dfn id="constructing-the-form-data-set" export data-lt="constructing the
58733
58737
entry list" data-x="constructing the entry list">construct the entry list</dfn> given a
58734
- <var>form</var>, an optional <var>submitter</var>, and an optional <var>encoding </var>, is as
58735
- follows. If not specified otherwise, <var>submitter</var> is null.</p>
58738
+ <var>form</var>, an optional <var>submitter</var>, an optional <var>resetUserInteracted </var>
58739
+ and an optional <var>encoding</var>, is as follows. If not specified otherwise, <var>submitter</var> is null.</p>
58736
58740
58737
58741
<ol>
58738
58742
<li><p>If <var>form</var>'s <span>constructing entry list</span> is true, then return
@@ -58749,6 +58753,8 @@ fur
58749
58753
<p>For each element <var>field</var> in <var>controls</var>, in <span>tree order</span>:</p>
58750
58754
58751
58755
<ol>
58756
+ <li>If <var>resetUserInteracted</var> is true, set <var>field</var>'s <span>user interacted</span> to false.</li>
58757
+
58752
58758
<li>
58753
58759
<p>If any of the following is true:</p>
58754
58760
@@ -72549,6 +72555,32 @@ Demos:
72549
72555
</ul>
72550
72556
</dd>
72551
72557
72558
+ <dt><dfn selector noexport><code data-x="selector-user-valid">:user-valid</code></dfn></dt>
72559
+ <dd>
72560
+ <p>The <code data-x="selector-user-valid">:user-valid</code> <span>pseudo-class</span> must match
72561
+ any element falling into one of the following categories:</p>
72562
+ <ul>
72563
+ <li><code>input</code> and <code>textarea</code> elements that have their <span>user interacted</span>
72564
+ set to true, are <span data-x="candidate for constraint validation">candidates for constraint validation</span>
72565
+ and that <span data-x="concept-fv-valid">satisfy their constraints</span>.</li>
72566
+ <li><span>Buttons and other built-in elements that are <span data-x="candidate for constraint validation">candidates
72567
+ for constraint validation</span> and that <span data-x="concept-fv-valid">satisfy their constraints</span>.</li>
72568
+ </ul>
72569
+ </dd>
72570
+
72571
+ <dt><dfn selector noexport><code data-x="selector-user-invalid">:user-invalid</code></dfn></dt>
72572
+ <dd>
72573
+ <p>The <code data-x="selector-user-valid">:user-valid</code> <span>pseudo-class</span> must match
72574
+ any element falling into one of the following categories:</p>
72575
+ <ul>
72576
+ <li><code>input</code> and <code>textarea</code> elements that have their <span>user interacted</span>
72577
+ set to true, are <span data-x="candidate for constraint validation">candidates for constraint validation</span>
72578
+ but do not <span data-x="concept-fv-valid">satisfy their constraints</span>.</li>
72579
+ <li><span>Buttons and other built-in elements that are <span data-x="candidate for constraint validation">candidates
72580
+ for constraint validation</span> but do not <span data-x="concept-fv-valid">satisfy their constraints</span>.</li>
72581
+ </ul>
72582
+ </dd>
72583
+
72552
72584
<dt><dfn selector noexport><code data-x="selector-in-range">:in-range</code></dfn></dt>
72553
72585
<dd>
72554
72586
<p>The <code data-x="selector-in-range">:in-range</code> <span>pseudo-class</span> must match
@@ -77870,16 +77902,24 @@ partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {
77870
77902
these substeps:</p>
77871
77903
77872
77904
<ol>
77873
- <li id="unfocus-causes-change-event"><p>If <var>entry</var> is an <code>input</code>
77874
- element, and the <code data-x="event-change">change</code> event <span
77875
- data-x="concept-input-apply">applies</span> to the element, and the element does not have a
77876
- defined <span>activation behavior</span>, and the user has changed the element's <span
77877
- data-x="concept-fe-value">value</span> or its list of <span
77878
- data-x="concept-input-type-file-selected">selected files</span> while the control was focused
77879
- without committing that change (such that it is different to what it was when the control was
77880
- first focused), then <span data-x="concept-event-fire">fire an event</span> named <code
77881
- data-x="event-change">change</code> at the element, with the <code
77882
- data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</p>
77905
+ <li>
77906
+ <p>If <var>entry</var> is an <code>input</code>
77907
+ element, and the <code data-x="event-change">change</code> event <span
77908
+ data-x="concept-input-apply">applies</span> to the element, and the element does not have a
77909
+ defined <span>activation behavior</span>, and the user has changed the element's <span
77910
+ data-x="concept-fe-value">value</span> or its list of <span
77911
+ data-x="concept-input-type-file-selected">selected files</span> while the control was focused
77912
+ without committing that change (such that it is different to what it was when the control was
77913
+ first focused), then:
77914
+
77915
+ <ol>
77916
+ <li>Set <var>entry</var>'s <span>user interacted</span> to true.</li>
77917
+
77918
+ <li id="unfocus-causes-change-event"><span data-x="concept-event-fire">Fire an event</span> named <code
77919
+ data-x="event-change">change</code> at the element, with the <code
77920
+ data-x="dom-Event-bubbles">bubbles</code> attribute initialized to true.</li>
77921
+ </ol>
77922
+ </li>
77883
77923
77884
77924
<li>
77885
77925
<p>If <var>entry</var> is an element, let <var>blur event target</var> be
0 commit comments