@@ -2606,21 +2606,29 @@ The Optionality Pseudo-classes: '':required'' and '':optional''</h4>
2606
2606
form elements are neither required nor optional.
2607
2607
2608
2608
<h4 id="user-pseudos">
2609
- The User-interaction Pseudo-class: '':user-invalid''</h4>
2609
+ The User-interaction Pseudo-classes: '':user-valid'' and '':user-invalid''</h4>
2610
+
2611
+ The <dfn id="user-invalid-pseudo">:user-invalid</dfn>
2612
+ and the <dfn id="user-valid-pseudo">:user-valid</dfn> pseudo-classes
2613
+ represent an element with incorrect or correct input, respectively,
2614
+ but only <em> after</em> the user has significantly interacted with it.
2610
2615
2611
- The <dfn id="user-invalid-pseudo">:user-invalid</dfn> pseudo-class
2612
- represents an element with incorrect input, but only
2613
- <em> after</em> the user has significantly interacted with it.
2614
2616
The '':user-invalid'' pseudo-class
2615
- must match an '':invalid'' , '':out-of-range'' , or blank-but-'':required'' elements
2616
- between the time the user has attempted to submit the form
2617
- and before the user has interacted again with the form element.
2618
- User-agents may allow it to match such elements at other times,
2617
+ must match an '':invalid'' , '':out-of-range'' , or
2618
+ blank-but-'':required'' elements between the time the user has attempted
2619
+ to submit the form and before the user has interacted again with the
2620
+ form element.
2621
+
2622
+ The '':user-valid'' pseudo-class must match a '':valid'' element between the
2623
+ time the user has attempted to submit the form and before the user has
2624
+ interacted again with the form element.
2625
+
2626
+ User-agents may allow them to match such elements at other times,
2619
2627
as would be appropriate for highlighting an error to the user.
2620
- For example, a UA may choose to have '':user-invalid'' match
2621
- an '':invalid'' element once the user has typed some text into it
2622
- and changed the focus to another element,
2623
- and to stop matching only after the user has successfully corrected the input.
2628
+ For example, a UA may choose to have '':user-invalid'' match an
2629
+ '':invalid'' element once the user has typed some text into it and
2630
+ changed the focus to another element, and to stop matching only after
2631
+ the user has successfully corrected the input.
2624
2632
2625
2633
<div class='example'>
2626
2634
For example, the input in the following document fragment
@@ -2642,8 +2650,6 @@ The User-interaction Pseudo-class: '':user-invalid''</h4>
2642
2650
2643
2651
Issue: Cross-check with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/%3A-moz-ui-invalid">'':-moz-ui-invalid''</a> .
2644
2652
2645
- Issue: Add <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/%3A-moz-ui-valid">:-moz-ui-valid</a> as '':user-valid'' per WG resolution.
2646
-
2647
2653
Issue: Evaluate proposed <a href="https://lists.w3.org/Archives/Public/www-style/2014Feb/0511.html">:dirty pseudo-class</a>
2648
2654
2649
2655
Issue: Clarify that this (and '':invalid'' /'':valid'' ) can apply to form and fieldset elements.
0 commit comments