Skip to content

Commit 2dadf1e

Browse files
committed
[selectors] Rename :user-error to :user-invalid
1 parent 4519d8d commit 2dadf1e

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

selectors/Overview.bs

+8-25
Original file line numberDiff line numberDiff line change
@@ -2320,13 +2320,13 @@ The Optionality Pseudo-classes: '':required'' and '':optional''</h4>
23202320
form elements are neither required nor optional.
23212321

23222322
<h4 id="user-pseudos">
2323-
The User-interaction Pseudo-class: '':user-error''</h4>
2323+
The User-interaction Pseudo-class: '':user-invalid''</h4>
23242324

2325-
The <dfn id="user-error-pseudo">:user-error</dfn> pseudo-class
2326-
represents an input element with incorrect input, but only
2325+
The <dfn id="user-error-pseudo">:user-invalid</dfn> pseudo-class
2326+
represents an element with incorrect input, but only
23272327
<em>after</em> the user has significantly interacted with it.
23282328
The '':user-error'' pseudo-class
2329-
must match an '':invalid'', '':out-of-range'', or empty-but-'':required'' form element
2329+
must match an '':invalid'', '':out-of-range'', or blank-but-'':required'' elements
23302330
between the time the user has attempted to submit the form
23312331
and before the user has interacted again with the form element.
23322332
User-agents may allow it to match such elements at other times,
@@ -2354,31 +2354,14 @@ The User-interaction Pseudo-class: '':user-error''</h4>
23542354
</pre>
23552355
</div>
23562356

2357-
<div class="issue">
2358-
This pseudo-class, which was taken from the
2359-
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/%3A-moz-ui-invalid">'':-moz-ui-invalid''</a> selector,
2360-
is named '':user-error'' rather than '':user-invalid''
2361-
because it combines checks for validity as well as omission.
2362-
We thought if it became necessary to distinguish between omitted and invalid values,
2363-
'':user-invalid'' and '':user-omitted'' could be used.
2364-
2365-
Alternatively, it might make more sense to rename this to '':user-invalid''
2366-
and add a '':blank'' pseudo-class that meant the field was blank.
2367-
This would allow authors to combine '':user-invalid:blank'' to select omitted required values,
2368-
and to combine '':user-invalid:not(:blank)'' to select filled out invalid values,
2369-
if necessary.
2370-
2371-
Both options are reasonable;
2372-
however since I can't think of a name for the '':-moz-ui-valid''
2373-
that would reasonably parallel '':user-error'',
2374-
I'm leaning somewhat to the second option.
2375-
(Other opinions welcome.)
2376-
</div>
2357+
Issue: Cross-check with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/%3A-moz-ui-invalid">'':-moz-ui-invalid''</a>.
23772358

2378-
Issue: Look into standardizing <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/%3A-moz-ui-valid">:-moz-ui-valid</a> as well.
2359+
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.
23792360

23802361
Issue: Evaluate proposed <a href="https://lists.w3.org/Archives/Public/www-style/2014Feb/0511.html">:dirty pseudo-class</a>
23812362

2363+
Issue: Clarify that this (and '':invalid''/'':valid'') can apply to form and fieldset elements.
2364+
23822365
<h2 id="structural-pseudos">
23832366
Tree-Structural pseudo-classes</h2>
23842367

0 commit comments

Comments
 (0)