Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions selectors-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,9 @@ The Validity Pseudo-classes: '':valid'' and '':invalid''</h4>
but a <a element>p</a> element has no validity semantics at all,
and so it never matches either of these pseudo-classes.

Elements which don't match '':valid'' must not match '':user-valid'', and
elements which don't match '':user-invalid'' must not match '':invalid''.

<h4 id="range-pseudos">
The Range Pseudo-classes: '':in-range'' and '':out-of-range''</h4>

Expand Down Expand Up @@ -2821,22 +2824,12 @@ The User-interaction Pseudo-classes: '':user-valid'' and '':user-invalid''</h4>
represent an element with incorrect or correct input, respectively,
but only <em>after</em> the user has significantly interacted with it.

The '':user-invalid'' pseudo-class
must match an '':invalid'', '':out-of-range'', or
blank-but-'':required'' elements between the time the user has attempted
to submit the form and before the user has interacted again with the
form element.

The '':user-valid'' pseudo-class must match a '':valid'' element between the
time the user has attempted to submit the form and before the user has
interacted again with the form element.
The '':user-invalid'' pseudo-class must match '':invalid'' elements after the
user has interacted with them or after attempting to submit the form.

User-agents may allow them to match such elements at other times,
as would be appropriate for highlighting an error to the user.
For example, a UA may choose to have '':user-invalid'' match an
'':invalid'' element once the user has typed some text into it and
changed the focus to another element, and to stop matching only after
the user has successfully corrected the input.
The exact matching behavior of '':user-valid'' and '':user-invalid''
are defined by the host language.
See, for example, <a spec=html lt=":user-invalid" selector>HTML's definition</a>.

<div class='example'>
For example, the input in the following document fragment
Expand All @@ -2860,8 +2853,6 @@ The User-interaction Pseudo-classes: '':user-valid'' and '':user-invalid''</h4>

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

Issue: Clarify that this (and '':invalid''/'':valid'') can apply to form and fieldset elements.

<h2 id="structural-pseudos">
Tree-Structural pseudo-classes</h2>

Expand Down