Re: Radio buttons id's and labels

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 UTC