#97 poll option labels


Can we get some <label> tags on the text labels next to
the poll options? These have a couple of advantages.
First off, when used properly, it makes it possible to
click on the text and have the appropriate radio box
checked. This is just more user friendly and easier to
work with, since you don't have to target that tiny
little radio box.

Second, it is better for users with accessibility tools
like screen readers, since the software can then
intelligently group the form controls with the labels,
resulting in much better feedback to the user.

The label tags can be used with other form elements as
well, such as in the (meta-) moderation system,
post/reply form, preferences, etc.

To use a <label> tag, you need an id attribute on the
form element, and a match for attribute in the label
tag. i.e.

<input type="radio" name="poll" value="1" id="poll_1">
<label for="poll_1">I don't need accessibility
<input type="radio" name="poll" value="2" id="poll_2">
<label for="poll_2">I hate accessibility, it makes
coding so much harder</label>
<input type="radio" name="poll" value="3" id="poll_3">
<label for="poll_3">I use, but don't really need,
accessibility tools</label>
<input type="radio" name="poll" value="4" id="poll_4">
<label for="poll_4">I need accessibility tools, you
inconsiderate clod!</label>


  • Peter Winnberg

    Peter Winnberg - 2004-03-21

    Logged In: YES

    <label> is not part of HTML 3.2. This will be fixed if /
    when we get HTML 4.01 / XHTML 1.x templates.

  • Rob Malda

    Rob Malda - 2004-03-22
    • priority: 5 --> 3

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks