<div class="gmail_quote">On Thu, Jun 3, 2010 at 3:48 PM, Aryeh Gregor <span dir="ltr"><<a href="mailto:Simetrical%2Bw3c@gmail.com">Simetrical+w3c@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Jun 3, 2010 at 12:11 PM, TAMURA, Kent <<a href="mailto:tkent@chromium.org">tkent@chromium.org</a>> wrote:<br>
> Oh, I'm sorry. I have found a sentence about visibility in the draft.<br>
> <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#constraint-validation" target="_blank">http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#constraint-validation</a><br>
>> If one of the controls is not being rendered (e.g. it has<br>
>> the hidden attribute set) then user agents may report a script error.<br>
><br>> The Chrome bug report is<br>
> here: <a href="http://code.google.com/p/chromium/issues/detail?id=45640" target="_blank">http://code.google.com/p/chromium/issues/detail?id=45640</a><br>
<br>
</div>I think this isn't a feasible strategy to pursue. You'd have to<br>
carefully define what's "not being rendered", and it will violate<br>
layering massively. CSS should not be able to override constraints<br>
set in HTML. The latter are part of the semantics of the form, and<br>
the former is supposed to only control presentation.<br>
<br>
If the user can't actually change the form to match requirements,<br>
that's a bug in the page. The browser should not try to guess what<br>
the page really meant using some inevitably complicated heuristic. It<br>
should respect what the page says, and make it not work. If the<br>
browser has a UI for form validation errors, it can use that to tell<br>
the user what the problem is in terms that the page author can<br>
understand, so the user can report it and the page can be fixed.</blockquote><div><br></div><div>I posted this on the Chromium bug, but I take the sentence Kent quotes to affect only the UI shown on a validation failure, not the actual results of validation. That is, if a control fails validation and has the "hidden" attribute, validation still fails, but the UA may display a message indicating the page has an error in addition to/instead of the normal validation failure message.</div>
<div><br></div><div>I agree that it would be a mistake to exclude "invisible" elements from validation, as that would be a rathole (and seems conceptually wrong to me).</div><div><br></div><div>PK</div></div>