How-to Guide

Grouping Radio Buttons and Checkboxes Under One Question

Short answer

Wrap each set of radio buttons or checkboxes in a group whose question is coded as its legend. A screen reader then announces the question together with each choice, so a patient hears How should we contact you, then Phone, instead of a list of unexplained words.

By Gio LaRocheUpdated 5 min read
Get my free auditor call (561) 291-2681

A choice with no question

Picture a booking form that asks how a patient would like to be reached. Visually, a sentence sits above three round buttons: Phone, Text message, Email. A sighted patient reads the sentence, then the choices, and understands.

A patient using a screen reader moves from control to control. If the sentence is only a paragraph above the buttons and is not connected to them, the screen reader announces Phone, radio button, one of three, then Text message, then Email. The question never comes up. The patient has to go back and hunt for it.

What the W3C recommends

The W3C Forms Tutorial says grouping related controls makes forms more understandable for everyone, and that grouping needs to be done both visually and in the page code. Its method is a fieldset, which is the container, and a legend, which is the question that acts as the group's heading. It says radio button sets should always be grouped this way.

The Labels or Instructions criterion adds the reason: each choice needs its own label, and when the choice labels do not explain what is being asked, an overall label, legend or instruction is needed. Phone, Text and Email alone do not tell a patient what they are choosing.

Form elementWhat the group needs
How should we reach you? Phone, Text, EmailA group with that question as its legend
Which days work for a first visit? Mon, Tue, Wed and so on, as checkboxesA group with the question as its legend
Mailing address fields and billing address fields with identical labelsTwo groups, so Street in one is told apart from Street in the other
A single checkbox such as I agree to receive text remindersNo group, because its own label is the whole question

Keep the legend short

The tutorial gives a practical warning. Depending on settings, some screen readers read the legend with every control in the group, some read it once, and rarely some skip it. Its two suggestions are to keep the legend as short as possible, and to make each choice label clear enough to stand alone without repeating the legend in every label.

  • Good legend: Best way to reach you
  • Too long: Please choose the way you would prefer our front desk staff to contact you about your visit request
  • Good choice labels: Phone call, Text message, Email
  • Too repetitive: Contact me by phone call, Contact me by text message

Keep health details out of the choices

Choose group questions that are about logistics, such as contact method, preferred days or language, and never about conditions or symptoms. Our guide to online appointment request form fields lists what to leave out of a first form.

How to check your own form

  1. 1Find every set of radio buttons or checkboxes on your contact, booking and intake forms.
  2. 2Open the page with a screen reader on, following our five-minute screen reader test.
  3. 3Tab to the first choice in a set and listen. If you hear the question, the group works.
  4. 4If you only hear the choice, send your designer one line: put each set of radio buttons and checkboxes in a fieldset with a legend.
  5. 5Check again after the change, and test the text-opt-in box from our guide to text message opt-in wording as a single checkbox, which needs no group.

The W3C also notes a code-based alternative, a group role with a reference to the question, for designs that a fieldset cannot style the way the designer wants. We do not give legal advice, and grouping controls does not by itself make a site conform to any standard.

Frequently asked questions

What is a legend in plain words?

It is the question or heading that belongs to a set of choices, written so that assistive technology can read it with them. On screen it often looks like a normal heading above the radio buttons. Under the surface it is tied to every button in the set.

Do dropdown menus need a group?

A dropdown is one control, so it needs its own label rather than a group. The W3C tutorial does show a way to group options inside a dropdown with option group headings, which helps on long lists.

Is a single checkbox a group?

No. A lone checkbox, such as agreeing to text reminders, is understood from its own label. Groups are for two or more related choices that answer one question.

Will grouping change how my form looks?

Browsers draw a border around a fieldset by default, but a designer can remove it or restyle it. The grouping lives in the code, so the page can look the same as before.

What if my form builder has no group option?

Ask whether it can add a heading or description to a set of choices that is connected to them. If it cannot, a plain text question above the buttons is better than nothing, but the screen reader test will show whether patients hear it.

Sources

Keep reading

Ready to Grow Your Practice?

Primara is now accepting new independent practices nationwide. Most new engagements begin within one week.

Send Us a Message

We respond within one business day.

* Required field

We'll call to confirm your consultation.

No spam, ever. HIPAA-aware agency. We respond within one business day. For urgent inquiries, call (561) 291-2681.

Founder-LedHIPAA-AwareServing Practices Nationwide