html_select_date attr id="label", for 508 accessibility?

From: Date: Thu, 29 Apr 2004 19:21:39 +0000
Subject: html_select_date attr id="label", for 508 accessibility?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11326@lists.php.net to get a copy of this message
We are obliged to make our websites "Section 508" accessible, see www.section508.gov. This includes making form labels match form input boxes, like: <form> <table> <tr> <td><label for="startdate">Start Date</label> <td><input id="startdate" name="formstartdate"> </tr> </table> </form> The "label for" must match the "input id". No big deal here. The html_select_time function doesn't have any optional attribute to specify the "id". I've been trying to use the generic attribute all_extra like: <td><label for="stopdate">Stop Date</label> <td>{html_select_date all_extra="id=\"stopdate\""} The syntax is a bit ugly but seems to generate sorta the right output: <td><label for="stopdate">Stop Date</label> <td><select name="Date_Month" id="stopdate"> <option label="January" value="01">January</option> ... </select> <select name="Date_Day" id="stopdate"> <option label="01" value="1">01</option> ... <option label="31" value="31">31</option> </select> <select name="Date_Year" id="stopdate"> <option label="2004" value="2004" selected="selected">2004</option> </select> So each of the three month/day/year pulldowns gets the same ID= attribute. Seems unhelpful -- especially for the visually impaired -- but is this the right thing? If this is OK, any chance of getting an "id=" attribute added to html_select_date options? If it's not OK from a 508 point of view, what's the right way to do this? Thanks.

« previous php.smarty.general (#11326) next »