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

Re: Radio buttons id's and labels

From: Chris Croome <chris@webarchitects.co.uk>
Date: Wed, 28 Jun 2000 19:19:36 +0100
To: Bruce Bailey <bbailey@clark.net>
Cc: "Massey, Nancy" <nmassey@postoffice.dca.net>, w3c-wai-ig@w3.org
Message-ID: <20000628191936.A12375@webarchitects.co.uk>
Hi

On Wed 28-Jun-2000 at 01:44:48PM -0400, Bruce Bailey wrote:
> 
> (1)  I too tend to use select form -- it's easier to navigate w/ a screen
> reader.  It also eliminates the particular problem you are having.

Yep, that was my first idea of how to fix it... but the implication is
that radio buttons then cannot be used for forms which need AA?

> (2)  Yes, you want all your radio buttons to have the same NAME value (or it
> doesn't work right), but there is no compelling reason why ID has to be
> equivalent to NAME, so your example code could be:
> 
>  <label for="role">Choice of role</label>
>  <input name="role" id="role1" value="Mentor only" type="radio">
> 	a Mentor only
>  <input name="role" id="role2" value="Mentor or a Lead Mentor" type="radio">
> 	a Mentor or a lead Mentor

The problem here is that the label then does not have a corresponding
form element...

I've just had another idea, nest the label tags?

  <label for="role1"><label for="role2">Choice of role</label>i</label>
  <input name="role" id="role1" value="Mentor only" type="radio">
       a Mentor only
  <input name="role" id="role2" value="Mentor or a Lead Mentor"
  type="radio">
       a Mentor or a lead Mentor

Or is this just a daft hack?


Chris

-- 
Chris Croome <chris@webarchitects.co.uk>

http://www.webarchitects.co.uk/
http://chris.croome.net/

Received on Wednesday, 28 June 2000 14:19:22 GMT

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