Should One HTML Radio Button In a Radio Group Always Be Checked?

10,617

Solution 1

Yes: http://www.w3.org/TR/html401/interact/forms.html#radio

At all times, exactly one of the radio buttons in a set is checked. If none of the elements of a set of radio buttons specifies `CHECKED', then the user agent must check the first radio button of the set initially.

The specification uses the term "user agent" for what is commonly known as "browser". So the specification says that if none is checked, the browser will check the first.

UPDATE: note that none of the 4 Browsers i tried actually does this! They dont check the first and none of the radios are given as =on to the server. A good web framework should do the serverside-checking (it should do it anyway because an abrupted or forged POST could cause the same).

Solution 2

I was going to say I read something in the past by Jakob Neilson, but heck, I found it: PS. personally I ALWAYS have one selected by default, and so for select boxes, but what happens is in legal terms and conditions, lawyers are afraaaaid, of course, you feed the cat to your dog you will always be afraid of the kittens :

Always offer a default selection for radio button lists. By definition, radio buttons always have exactly one option selected, and you therefore shouldn't display them without a default selection. (Checkboxes, in contrast, often default to having none of the options selected.) ◦If users might need to refrain from making a selection, you should provide a radio button for this choice, such as one labeled "None." Offering users an explicit, neutral option to click is better than requiring the implicit act of not selecting from the list, especially because

http://www.useit.com/alertbox/20040927.html

Solution 3

Standards don't always make sense

If you follow the standard (which is what Neilson does) that as other answers state - than one radio button should always be checked.

But if you follow common sense, and design for use cases than the answer is clearly not. For god knows what reason the standard completely neglects a very popular use case:

The user shall make an exclusive choice, but no default shall exist.

Perhaps a prime example for this is likert scales - any default will prime participants:

A likert survery

A modern language example

How would you translate to an interface the following question:

Would you like tea or coffee?

The standard forces you to ask it this way:

Would you like tea or coffee? I believe it's tea that you want.

And so no one comply with them

It is exactly because the standard doesn't account for such cases (and the lack of usability in alternatives, like comboboxes with a blank option) that no browser comply with the standard - Imagine Google Forms with radio buttons having a default.

Solution 4

Anytime you're overriding a default browser behaviour you're creating uncertainty for the user. Furthermore, on average, when there are two options there is a 50% chance that the pre-selected one will be correct. Forcing the user to select it just slows them down on the assumption they're either blind or clueless.

I would personally find the concept insulting - but then I'm not a manager.

Share:
10,617

Related videos on Youtube

James Wiseman
Author by

James Wiseman

I am a Microsoft certified C# developer working in the UK financial services industry. I started my career building software for a chemical weapons detection system for the British army before moving to Scotland to work in legal software. I now develop C# web-based applications in the pensions and life-assurance industry. I've written code since i was 9 years old, initially on my BBC Micro. I've used C#, jQuery, JavaScript. C++, SQL, VB and am proficient web development. I have presented courses in jQuery and have spoken at a local Techmeetup group on JavaScript static analysis. I run a web page and blog dedicated to discussions of my software development experiences. More recently, a thread of consumer-affairs related articles that I have written has featured in the Independent and Mirror newspapers. My personal blog is at http://www.jameswiseman.com/blog/ Twitter: @jameswiseman76 SOreadytohelp

Updated on April 28, 2022

Comments

  • James Wiseman
    James Wiseman about 2 years

    Are there any standards (HTML, UI, accessibility, and such like) that stipulate that one of the radio buttons in a given group of radio buttons should be selected at all times?

    I have encountered a business requirement whereby I have been asked that both radio buttons in a group be left unchecked, and then to have logic forcing the user to select one before they can continue.

    While I know how to achieve this, it felt wrong, and I intimated as such, but was looking for guidelines that stipulate this more explicitly so I can feed this into our own standards.

  • Ayyash
    Ayyash over 13 years
    think of it this way: male, female, at least 50% of your audience dont have to click... :)
  • chryss
    chryss over 13 years
    And the other 50% will be annoyed that the other option is considered the default. (I follow the general argument, but there are sticky issues that need resolving in the relevant problem domain."
  • James Wiseman
    James Wiseman over 13 years
    Short and to the point, but exactly what I was after. Accepted answer because it links to the formal standard, which I can reference. Apologies to everyone else, though all helpful are voted up.
  • DA.
    DA. over 9 years
    I agree that there are times when not having a default option makes sense, but I don't know that a Likert scale is actually a good example. It would make as much 'common sense' to have the 'neutral' option be selected in each case by default. (I'll save a debate on how usable Likert scales are to use in general for another day :)
  • Billy
    Billy over 8 years
    That's why we use select menus for sizes, not radios.