[whatwg] Form validation against invisible controls

On Thu, Jun 3, 2010 at 8:16 AM, TAMURA, Kent <tkent at chromium.org> wrote:
>> > An element is a "candidate for constraint validation" if
>> > 1. it is a validatable type,
>> > ? ?e.g. true if <input type=number>, false if <input type=reset>
>> > 2. has no "disabled" attribute,
>> > 3. has no "readonly" attribute,
>> > 4. inside of a <form> element,
>> > 5. has non-empty "name" attribute, and
>> > 6. not inside of a <datalist> element.
>> >
>> > I hope ValidityState and the pseudo classes ignores 2-6.
>>
>> The pseudo-classes do not ignore 2, 3, and 6. (4 and 5 are now removed.)
>
> I'd like to propose to add another condition:
> ?7. it is visible (computed 'display' property of CSS isn't 'none' and no
> 'hidden' content attribute)
> I couldn't find exceptional rules for validating invisible controls in the
> current draft.
> Chrome 5 was released with a part of interactive validation, and we received
> a bug report about validation against invisible form controls.

Adding @hidden to the list of things that skip validation is good.
Adding display:none is not.  That's a big layering violation that we
authors have to suffer through with screen readers already.  I'd
greatly prefer not muddying the waters there.

~TJ

Received on Thursday, 3 June 2010 08:38:36 UTC