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

additional label question

From: <Sebastiano.Nutarelli@csi.it>
Date: Fri, 1 Apr 2005 19:25:02 +0200
To: <w3c-wai-ig@w3.org>
Message-ID: <OFBD16AE1B.3482C293-ONC1256FD6.005DCA6F-C1256FD6.00600EB5@csi.it>
You can't associate multiple text boxes with the same label, to do it you
have to put two equal id, and XHTML code wouldn't be valid..
About you code example and about accessibility you shoud consider that
screen readers often aren't able to read table "linearized" and so it could
be useful put a hide label just for blind people -->
        ... <tr>
                        <th scope= “col”>ID</th>
                        <th scope= “col”>First Name</th>
                        <th scope= “col”>Last Name</th>
                        <td><label for="a"><span class="hide">Insert
ID</span></label><input type=”text” name=”id1” id="a" /></td>
                        <td><label for="b"><span class="hide">Insert first
name</span></label><input type=”text” name=”fname1” id="b" /></td>
                        <td><label for="c"><span class="hide">Insert last
name</span></label><input type=”text” name=”lname1” id="c" /></td>
            </tr> ...
  CSS2:         .hide{position: absolute;top: -10000px;left:-10000px;width:

Use left off tecnique to put out of page contents included in tag with

And more: why you put scope="row" in your first cells every row?
In your example isn't useful..

Sebastiano Nutarelli
IWA/HWG Member
W3C WCAG WG Member
----- Inoltrato da Sebastiano Nutarelli/CSI/IT il 01/04/05 19.08 -----
                      "Beheler Kim"                                                                                                   
                      <beheler_kim@bah.        Per:      <w3c-wai-ig@w3.org>                                                          
                      com>                     Cc:                                                                                    
                      Inviato da:              Oggetto:  additional label question                                                    
                      01/04/05 18.56                                                                                                  

Hi everyone,

I have another question regarding label tags for form fields.  I have a
data table that has input boxes in each cell.   Do the label tags need to
be associated with the appropriate text in this situation, since the data
cell is already associated with the header?  If so, is it possible to
associate multiple text boxes with the same label and how would you go
about it?   An example of code as follows:

<table align="center" width="80%" cellpadding="2">
                        <th scope= “col”>ID</th>
                        <th scope= “col”>First Name</th>
                        <th scope= “col”>Last Name</th>
                        <td scope=”row”><input type=”text” name=”id1”
                        <td><input type=”text” name=”fname1” /></td>
                        <td><input type=”text” name=”lname1” /></td>
                        <td scope=”row”><input type=”text” name=”id2”
                        <td><input type=”text” name=”fname2” /></td>
                        <td><input type=”text” name=”lname2” /></td>

Thanks in advance for your help,
Received on Friday, 1 April 2005 17:24:18 UTC

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