W3C home > Mailing lists > Public > public-html@w3.org > December 2013

Re: Browser inconsistencies wrt data validity semantics on form elements

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 23 Dec 2013 16:13:20 -0500
Message-ID: <52B8A770.7010302@mit.edu>
To: public-html@w3.org
On 12/23/13 10:36 AM, Šime Vidas wrote:

 > Premise: If the :invalid and :valid selectors apply on a form
 > element, than that element has data validity semantics.

How are you defining "data validity semantics"?  That term is not 
present in the HTML specification.

> I've tested in a few desktop browsers (on Windows) and I've noticed some
> inconsistencies: The <form> element does not have data validity
> semantics in Chrome/IE11 but it has in Firefox.

http://www.whatwg.org/specs/web-apps/current-work/#selector-valid and 
http://www.whatwg.org/specs/web-apps/current-work/#selector-invalid (or 
http://www.w3.org/html/wg/drafts/html/master/disabled-elements.html#pseudo-classes 
if you prefer) are very clear about what :valid and :invalid are 
supposed to match (modulo 
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=24165>) and they should 
be matching <form> elements that have an <input required> in them.  So 
Firefox is correct here per current spec text.

> The behavior is opposite
> wrt <input type=submit> (Semantics in chrome/IE11 but not in Firefox).

Per current spec text, looks like Chrome/IE are doing the right thing 
here, since <input type="submit"> is not barred from constraint validation.

>  From what I can see in the HTML 5.1 spec, there seem to be no validity
> requirements for <input type=submit>

Indeed, and since it's not barred from constraint validation it's always 
valid, modulo setCustomValidity().

-Boris
Received on Monday, 23 December 2013 21:13:48 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:36 UTC