Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#80 Make selectboxes legal XHTML

open
nobody
htsearch (29)
5
2004-11-26
2004-11-26
Soren Roug
No

My request is pretty simple:

Currently htsearch generates select-boxes that look like
this (less-than replaced with brackets):

Match: [select name="method"]
[option value="and" selected]All

This dates back to an era when webbrowsers were
simple and forgiving. This will not do with new HTML
standards and new standards-compliant browsers.

To make it legal XHTML, close the option tag and give
selected attributes a value.

Match: [select name="method"]
[option value="and" selected="selected"]All[/option]

To make it *accessible* for blind people, surround each
input control with the [label] tag as in:

[label]Match: [select name="method"]
[option value="and" selected="selected"]All[/option]
...
[/select]
[/label]

This will make it clear that the label Match: is
associated with the select box.

Discussion