Should one HTML radio button in a radio group have to be checked?

Are there any standards (HTML, UI, accessibility, etc.) that stipulate that one of the radio buttons in this radio button group should always be selected?

I ran into a business requirement when I was asked to turn off both switches in a group and then force the logic to force the user to select one before they could continue.

While I know how to achieve this, he did not feel like that, and I hinted as such, but looked for guidelines that stipulate this more explicitly so that I can feed this into our own standards.

+4
source share
6 answers

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

At all times, only one of the switches in the set is checked. If none of the elements in the radio set indicate "CHECKED", then the user agent must first check the first switch from the set.

The specification uses the term "user agent" for the well-known type of "browser". Thus, the specification states that if none is installed, the browser checks the first.

UPDATE: note that none of the 4 browsers I tried actually does this! They do not check the first and none of the radios on the server =on . A good web structure should check the servers (it should do this anyway, because a broken or tampered POST can do the same).

+12
source

I was going to say I read something in the past by Jacob Neilson, but damn it, I found this: PS. I personally ALWAYS have one selected by default, and therefore for selective boxes, but what happens is in legal conditions, lawyers, afriads, of course, you feed a cat to your dog, you will always be afraid of kittens:

Always offer default choices for radio button lists. By definition, radio buttons always have exactly one option selected, and therefore you should not display them without a default choice. (Flags, in contrast, often by default do not have the selected options.) ◦ If users may need to refrain from choosing, you must provide a radio for this choice, for example, one is labeled "No." Providing users with an explicit, neutral option for clicking is better than requiring an implicit action not to select from the list, all the more so

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

+5
source

At any time, when you override the default behavior of the browser, you create uncertainty for the user. In addition, on average, when there are two options, there is a 50% chance that the pre-selected one will be correct. Forcing the user to choose one simply slows them down, believing that they are either blind or ignorant.

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

+2
source

Standards don't always make sense

If you follow the standard (this is what Neilson does), which, as other answers claim, you should always check one switch.

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

The user must make an exceptional choice, but by default should not be.

Perhaps a striking example for this is the number scale - any defaults will be the main participants:

A likert survery

An example of modern language

How would you translate the following question to the interface:

Do you want tea or coffee?

The standard forces you to ask this question as follows:

Would you like some tea or coffee? I believe the tea you want.

And so no one abides by them

This is precisely because the standard does not take into account such cases (and the lack of usability in alternatives, for example, comboboxes with an empty option), that the browser does not comply with the standard. Imagine Google Forms with default radio buttons.

+2
source

Not. You can do this using javascript (jQuery is an option).

0
source

A good example is that you have an online store and you want the customer to make an active choice, instead of allowing some orders, when the customer simply clicks on to add to the cart, without choosing any size and, therefore, getting the selected the size.

I am wrong?

0
source

All Articles