W3C home > Mailing lists > Public > www-style@w3.org > June 2005

Re: Is Safari right or wrong? Should "display: none" prevent form elements from being submitted?

From: Brian Sexton <discussion-w3c@ididnotoptin.com>
Date: Fri, 24 Jun 2005 04:19:30 -0700
Message-ID: <00f101c578ae$9721e230$651aa143@desktop>
To: "www-style" <www-style@w3.org>

Leon et al.,

> W. Leon Sutton, Jr. wrote:
> Although you both do have a valid point (and I'm inclined to
> agree...partially) the logic that "if you can't see it, how can you use 
> it"
> does apply.  I think it could be semantically correct and incorrect either
> way.

I am typing this line with my eyes closed . . . even though I cannot see my 
keyboard.  Perhaps more importantly, the property is called "display", not 
"exist" or something like that, so if the semantics of properties were to 
govern behavior, I think we would need something like the latter, but 
existence can already be controlled through scripting (if support is present 
and enabled, that is).

(My eyes are back open now, by the way.)

> In my opinion, forms that are rendered "display: none" and "visibility:
> hidden" should have no useful value whereas the user cannot see it and,
> thus, cannot use it.

By that rationale, should a form that is merely positioned outside the 
viewport have no useful value?  Should a field of type "hidden"?

> With that said, however, it is true that there may be a use to "minimize"
> the form area that has already had information saved in something like a
> session variable (for server-side applications) and only the proceeding 
> form
> areas need be filled in.  In that case, yes, it would be useful to hide 
> the
> form area and allow it, still, to be submitted.

Right, there are perfectly valid reasons to tidy things up.

> So, either way (and that just goes to prove it), the fact that Safari
> renders form elements which have been hidden useless can be both correct 
> and
> incorrect.

I see your point, but shouldn't one behavior or the other be specified 
somewhere for the sake of inter-operability?  Divergence in the 
implementations of such an important behavior could be even more problematic 
than forbidding target attributes and strike elements in strict markup (the 
former prevents links within documents in object elements from targeting the 
top of the viewport such as could be useful for common headers and footers 
while the latter prevents semantically setting off rescinded content via 
markup, making it look current when styling is not applied).


Kind regards,

Brian Sexton 
Received on Friday, 24 June 2005 11:19:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:37 GMT