[WEB4LIB] RE: Radio buttons on forms

James Cayz cayz at lib.de.us
Tue Sep 7 13:47:58 EDT 2004


Paula, all;

Oh, I remember this - this "first radio-button named with no CHECKED"
problem.  It may have been even in HTML 3.X...

This used to be more fun when the two leading browsers (MSIE and Netscape)
did this differently.  I believe MSIE would allow you to have an unanwered
radio-button, but Netscape, like Lynx, would select the first in the list
when no CHECKED items were present.

Lynx has a slightly different issue - since you have to tab through each
item to get to the end of the list to hit submit, by definition, you would
have selected something as you tabbed through, even if it was the first
(or last) radio button in the list.  This is just like the GUI browsers's
action - once you have selected *something*, you can't unselect everything
- *something* is left turned on & submitted.

Which is why I never understood the new standard's wording to allow a
blank radio-button selection - once selected, even in error, the user has
to reload the entire page (presumably losing all other selections and
input), just to deselect that radio-button.  If you want NO selection, use
a checkbox, or code a "N/A" radio button.

This may be lost on everyone whose cars only had digital radios in them -
but does anyone else remember how tough it was to have *no* radio buttons
pushed in on their real car?  And most of the time, the half-push needed
messed up the station reception anyway...

Just my $0.02

James


+--------------------------------------------------------------------------+
| James Cayz          Telecommunications / Network Technologist I          |
| Email:cayz at lib.de.us     Voice:302-739-4748 x130      Fax:302-739-6787   |
| Delaware Division of Libraries # 43 S. DuPont Hwy / Dover, DE 19901-7430 |
+--------------------------------------------------------------------------+

On Fri, 3 Sep 2004, Paula Edmiston wrote:

>
>Norwood, Randy:
>
>> Actually, it is possible to have a set of radio
>> buttons with none selected.
>
>That's what I thought too. Here's my problem. I made several
>surveys, incorporating a lot of radio buttons. I did not
>code in "checked" for any. None. The surveys looked fine
>in Moz and IE.
>
>But I'm using a perl script that uses little templates. One
>perl script for the engine, then 3 little files to
>1) check for incomplete answers and prompt the user to return
>and answer them.
>2) format the data and save it to a file
>3) take the user to a "thank you" page
>
>Right away I tried it out in Lynx, a text-only browser used by screen
>readers (I use lynx to try to make sure stuff is accessible) --
>there will be a student in the class who is blind. The weird thing
>was, in lynx, when I opened the surveys, the first option of
>every question was checked. Automatically, by default. I did *not*
>code any answer to be default checked.
>
>Then I tried the surveys in moz and ie, leaving fields blank. My
>perl script did "see" that I left empty the text and drop-down
>pick list items *but* it did *not* report that radio buttons were
>unanswered, though in a graphical browser all of the radios appear
>unchecked. When I look at the file the data gets written to, these
>fields are empty!
>
>So could it be a browser problem? I'm really confused about this.
>You can take a look at the surveys:
>
>> I've done this type of validation in javascript, and PHP and
>> Perl on the server side. Javascript is preferable, IMO.
>> It's been a while since web developers have had to be concerned
>> about users not having adequate Javascript support--especially
>> for something like form validation.
>
>I have a js to validate but I don't want to use it because I
>need these surveys to be ada accessible. Also I tend to avoid js
>when I can because while technology has surely brought the vast
>majority of browsers up to speed, I keep hearing that many people
>deliberately turn off js in their browsers.
>
>You can see the survey at
>http://gief.pair.com/edmiston/coral/weekly.shtm
>See the data file that gets written to at
>http://gief.pair.com/edmiston/coral/data-weekly.txt
>and a copy of the script at
>http://gief.pair.com/edmiston/coral/survey.txt
>
>This is a sandbox, feel free to answer the survey and look at the data.
>
>Thanks for your suggestions!
>
>The main confusion for me is that in a
>graphical browser the buttons appear unchecked. But the script
>does not treat them as unchecked, that is, it doesn't call the
>error text that tells the user questions are unanswered. but
>when it writes to the data file it enters empty fields for
>the unanswered questions.
>
>best,
>paula
>
>
>
>----
>Paula Edmiston
>paula at edmiston.org
>---------------------------------
>Natives who beat drums to drive off evil spirits
>are objects of scorn to smart Americans who blow
>horns to break up traffic jams. - Kelly
>
>



More information about the Web4lib mailing list