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.

http://ppewww.ph.gla.ac.uk/%7Eflavell/alt/alt-text.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).

http://www.w3.org/TR/html4/struct/global.html#h-7.4.3



-- 
David Dorward                                     http://david.us-lot.org/
         Redesign in progress: http://stone.thecoreworlds.net/
  Microsoft announces IE is dead (so upgrade):
http://minutillo.com/steve/weblog/2003/5/30/microsoft-announces-ie-is-dead
Received on Tuesday, 17 June 2003 05:23:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:09 GMT