[whatwg] Submit controls should be barred from constraint validation in favor of a new pseudo-class

Ian Hickson ian at hixie.ch
Fri Jul 29 10:08:17 PDT 2011


On Tue, 3 May 2011, Mounir Lamouri wrote:
> On 05/02/2011 10:44 PM, Ian Hickson wrote:
> > On Fri, 31 Dec 2010, Mounir Lamouri wrote:
> > > On 12/31/2010 02:20 AM, Ian Hickson wrote:
> > > > far as I can tell. Anything that's visible and submitted is a candidate
> > > > for constraint validation.
> > > 
> > > Except<keygen>  and<object>.
> > > But do we agree that "it's visible and submittable so it should be able
> > > to be invalid" is not a sane rule? At least, we should not include
> > > non-editable but visible submittable controls like submit controls.
> > 
> > This only affects people who go out of their way to make submit controls
> > invalid, right? I guess I don't really care one way or the other, but it
> > seems easier all around to just make things as consistent as possible and
> > just allow it.
> > 
> > At the end of the day, on this, I'll spec whatever gets implemented. Do we
> > have multiple implementations one way or the other yet?
> 
> Opera 11.20 allows submit controls to be invalid and Gecko (since 2.0) 
> does not. I haven't check Webkit but IIRC, it has the same behavior as 
> Opera.

Indeed.

In fact, in testing this I found that the resulting UI would actually be 
kind of useful in certain scenarios. For example, an EULA "decline" button 
could be marked invalid with the message "If you decline this license 
agreement, you cannot use this site" or some such.

I've left the spec as is for now. I don't see much value in preventing 
submit buttons from being able to participate in this mechanism.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list