#169 Polls: Accessibility requires <LABEL> tags

open
nobody
None
5
2012-12-08
2005-04-09
Ralph Bolton
No

Polls break the accessibility of Tiki pages because
they lack <LABEL> tags that should be associated with
the Radio button form input.

Details are at
http://www.access-board.gov/sec508/guide/1194.22.htm#\(n)

The patch is trivial, to templates/tiki-poll.tpl:

5c5,6
< <input type="radio" name="polls_optionId"
value="{$channels[ix].optionId|escape}"
/>{tr}{$channels[ix].title}{/tr}<br/>
---
> <input type="radio" name="polls_optionId"
value="{$channels[ix].optionId|escape}"
id="{$channels[ix].optionId|escape}"/>
> <label
for="{$channels[ix].optionId|escape}">{tr}{$channels[ix].title}{/tr}</label><br/>

Discussion

  • Ralph Bolton
    Ralph Bolton
    2005-04-10

    Logged In: YES
    user_id=802047

    Whoops! the ID and FOR attribute needs to start with a
    letter, not a number, so should be more like:

    id="poll{$channels[ix].optionId|escape}"

    ...and...

    for="poll{$channels[ix].optionId|escape}"

    ...with that, it'll pass W3C checking, and Accessibility
    checking ;-)