Re: Display

Hi Colt,

It's just occurred to me what the actual context of your original
request was!

> It seems the convention to show / hide a validation tag is to change 
> the inline style from display:none; to display:inline;

> 	.form li > label span[style*="inline"] {
> 		display: block !important;	
> 		}

You're talking about form validation, in particular the marker which
indicates whether a form field entry was valid according some criterion,
right?

The way you described it, it sounds like this marker is present in the
bare document, and that you're relying on CSS to hide it most of the
time, and then using JS to unhide it when invalid input has been entered.

I just wanted to point out that this isn't a very clean direction from
which to approach the problem: any browser with CSS "turned off" in some
sense (perhaps including non-graphical or even non-visual browsers being
used for accessibility reasons) would always see the "it's invalid!"
marker, even before they'd entered anything!

It would be better to not include the marker at all in the bare
document, but instead introduce it only when necessary, using JS.  This
bypasses the whole need for toggling display; instead you'd be using DOM
manipulation functions to insert or remove the marker mark-up/content.

(I shan't comment further on this, since it's now getting very
off-topic for this mailing list.)

Cheers,
Anton Prowse
http://dev.moonhenge.net

Received on Tuesday, 27 April 2010 21:56:07 UTC