W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2003

Re: Forms

From: David Dorward <david@us-lot.org>
Date: Tue, 17 Jun 2003 10:21:45 +0100
To: Angela K Hilton <angela.hilton@umist.ac.uk>
Cc: w3c-wai-ig@w3.org
Message-ID: <20030617092145.GA2566%david@us-lot.org>

On Tue, Jun 17, 2003 at 09:33:00 +0100, Angela K Hilton wrote:

> Am I correct in thinking that the <label> == <id>?  Or is it actually the same 
> as <name>: I have always set "name" and "id" as the same thing.  But what I'm 
> not clear on is which property a screen reader would read.  

The name attribute is for associating the form field with a name on the server.

The id attribute is for associating things (labels, css, javascript) with elements.

The for attribute of the label tag associates a label with a specific
form field (via its id)

(And name couldn't be used for this, because you can have multiple
form fields with the same name but different labels, such as a group
of radio buttons)

>   <input type="text" name="lastname" accesskey="L" tabindex="1" id="lastname" 
> alt="Last Name">

> I am also having trouble getting the alt tag to work.

HTML doesn't have an alt tag, do you mean the alt attribute? Why do
you want to provide the browser with alternative content for use in
the event of it being unable to display the form field? There is a
reason that there is no alt attribute for the <input> tag in HTML.


I suspect you are looking for a tooltip effect in common browsers, and
that is achieved with title (although as its properly labeled, it
seems rather redundent to me).


David Dorward                                     http://david.us-lot.org/
         Redesign in progress: http://stone.thecoreworlds.net/
  Microsoft announces IE is dead (so upgrade):
Received on Tuesday, 17 June 2003 05:23:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:16 UTC