[whatwg] :invalid
Simon Pieters
simonp at opera.com
Thu Sep 23 21:31:53 PDT 2010
On Fri, 24 Sep 2010 02:50:42 +0200, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 9/23/10 6:12 PM, Mounir Lamouri wrote:
>> So, to improve the user experience while using web forms we would like
>> to fix that. However, we are wondering if :invalid (and :valid?)
>> specifications should be updated to take UX considerations or if a new
>> pseudo-classe should be created. Does anyone has an opinion about that?
>
> I was actually thinking about this the other day... We could add a new
> pseudo-class for matching form controls that have their default value
> (or that don't, depending on how we expect this to be used). then you
> could style :invalid:not(:has-default-value) specially, say....
That wouldn't get the right UX if the user tabs through a required field
or tries to submit a form without touching a required field.
I was thinking of :invalid:dirty where :dirty matches form controls that
have received and lost focus or its form has been tried to be submitted,
or some such.
> Or I suppose we could just add a new pseudo-class that means the above.
>
> Are there cases when pages would set invalid default values and want
> them flagged as such in UI?
>
> -Boris
>
--
Simon Pieters
Opera Software
More information about the whatwg
mailing list