[thelist] CSS-Only Forms That Don't Suck

Jeff Howden jeff at jeffhowden.com
Mon Jun 20 16:04:14 CDT 2005


> From: Joshua Olson [mailto:joshua at waetech.com] 
> The descriptive text under fields, such as the "email"
> field, is marked up with <small> tags.  Example:
> <input name="email"...>
> <small>We will never sell or disclose your email address
> to anyone.  Once your account is setup, you may add
> additional email addresses.</small>
> Semantically, this means nothing other than there is
> small text after the input box. [...]

Well, seeing as how there isn't a <note> element, I'm not exactly sure what
the alternative would be.

> [...] The specifications for elements include a "title"
> and "alt" attributes and I think it would be appropriate
> to duplicate this note regarding the field in one of
> those attribute. [...]

First, "duplicate" is such a troublesome word.  That would make me really
uneasy and I suspect it'd make navigating/reading the form just that much
more difficult for the sight-impaired user.

Second, the alt attribute is for user agents that cannot display images or
applets (form is listed, but I believe refers only to image input submits)
and is used to specify *alternate* text (emphasis is mine).

> [...] Otherwise, find some other fashion to bind the
> field with it's note, semantically.

The title is certainly the more appropriate to use, but I'm concerned about
the usability of only trying to use the title attribute, especially in cases
where there is more than just a few words of explanation required.  So,
duplicate you say?  Ugh, talk about a nightmare of an experience for
sight-impaired visitors, not to mention the maintenance headaches.

Unfortunately, the title attribute won't work in all instances.  Select
elements and their child elements optgroup and option don't render title
attribute values as suggested by the spec.

So, to account for the issues where there is too much text for a title
tooltip and/or elements that don't adequately support the title attribute
we're forced to render this information to the user in some other manner.
Sadly, as you're aware, there isn't a suitable, semantic element/way to bind
the note to its field.

> As a side-bar, I just noticed that the HTML 4.01 
> specification defines the ENTITY encompassing the
> internationalization attributes (lang and dir) using
> hacker shorthand: %i18n.  :-)

Actually, it's not hacker shorthand, but something called a numeronym, a
number based word, and was first used at DEC in the mid-80's [0].

[0] http://www.i18nguy.com/origini18n.html


 [>] Jeff Howden
     jeff at jeffhowden.com

More information about the thelist mailing list