Re: Label versus Title

> <label for="month">Please enter your birth month and year:</label> <input
> type="text" id="month"> <input type="text" id="year" title="Enter year">

This is a misuse of title; an appropriate title might be "year of birth".

> <label for="month">Please enter your birth month</label> and <label
> for="year">year</label>:<input type="text" id="month"> <input type="text"
> id="year">

I don't think "Please enter your" is really part of the label, but otherwise
this makes sense.  I would say that it benefits all users, so doesn't
need to be justified on accessibility grounds.

> <label for="month">Please enter your birth month</label> and year:<input
> type="text" id="month"><span class="invisibleText"><label for="year">Enter
> your birth year</label></span> <input type="text" id="year">

No on two grounds:

- you've lost the usability to general users;
- this is a misuse of span; the class should be on the label.

Also note, that from an HTML point of view, if not a working round broken
browsers point of view, the label element should enclose the input element
and you will then not need the for parameter (and id can be name).  You
would then need another element to cause invisibility, but do you really
need to suppress helpful information?

Received on Saturday, 20 April 2002 05:16:29 UTC