Simple tricks for more usable forms
My second article for SitePoint has been published: Simple tricks for more usable forms. It examines a whole bunch of CSS and Javascript tricks for improving the usability of web based forms without impairing their accessibility to clients that don’t support those technologies. The article has already had some useful feedback on the forums, including the valuable observation that auto-selecting the contents of a form field when it receives the focus can have a negative effect on the usability of Unix browsers, where mouse buttons are frequently used for coping and pasting.
Hugh Todd - 23rd January 2004 07:23 - #
Jesse Ruderman - 24th January 2004 11:41 - #
webdroid - 25th January 2004 07:24 - #
Srijith - 26th January 2004 02:18 - #
Harry Fuecks - 27th January 2004 22:53 - #
Jemal - 27th January 2004 23:19 - #
<label for="myradio">Radio Button:</label><input type="radio" name="myradio" id="myradio" />Lach - 28th January 2004 01:09 - #
What I should have mentioned is that according to the spec, each radio button shares the same "control name" (name or id). This means that a label for a specific radio button can only refer to the entire group. Your example with more than one button would be more like this:
<label for="myradio">First Button:</label><input type="radio" name="myradio" id="myradio" value="1" />
<label for="myradio">SecondButton:</label><input type="radio" name="myradio" id="myradio" value="2" />
Which myradio is each label supposed to be assigned to? So what's to be done? Wrapping the labels like so:
<label>First Button:<input type="radio" name="myradio" id="myradio" value="1" /></label>
<label>SecondButton:<input type="radio" name="myradio" id="myradio" value="2" /></label>
...makes the click to focus trick work in Mozilla but not IE. Any ideas?
Jemaleddin - 28th January 2004 15:50 - #
dfsa - 11th January 2006 23:46 - #