Skip to content
easeweb
Search topics

Radio buttons and checkboxes without a group name

A checkout asks its questions in bold text above each set of options, but nothing ties the question to the options, so a screen reader reads “Yes, radio button” with no question.

WCAG 2.2
SC 1.3.1A
Required by
Section 508 · EN 301 549 (EU)
Broken
Yes to what?
The accessibility problem illustrated.
01

The problem

Screen reader users hear “Yes” or “Express” but not the question it answers.

02

Try it

Press Tab to move into each question, and use the arrow keys between Yes and No.

Both versions look the same. Below the form, check whether the screen reader hears the question or only the answer.

Broken Can you fix this?

Leave the parcel if no one is home?

Send me updates by

Screen reader hears (Tab into a question)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Make the question the group's name: a fieldset and legend, or a group role pointing at the question.

  1. 1Every set of radio buttons, and every set of checkboxes answering one question, is grouped in the markup.
  2. 2The group is named by the question as printed, through a legend or aria-labelledby.
  3. 3Every option keeps its own label as well as the group name.
Before Questions as plain text above the options
<p class="question">Leave the parcel if no one is home?</p><div class="options">  <input id="leave-yes" type="radio" name="leave" value="yes">  <label for="leave-yes">Yes</label>  <input id="leave-no" type="radio" name="leave" value="no">  <label for="leave-no">No</label></div> <p class="question">Send me updates by</p><div class="options">  <input id="by-email" type="checkbox" name="updates" value="email">  <label for="by-email">Email</label>  <input id="by-text" type="checkbox" name="updates" value="text">  <label for="by-text">Text message</label></div>
After

A fieldset and legend

<fieldset class="options">  <legend class="question">Leave the parcel if no one is home?</legend>  <input id="leave-yes" type="radio" name="leave" value="yes">  <label for="leave-yes">Yes</label>  <input id="leave-no" type="radio" name="leave" value="no">  <label for="leave-no">No</label></fieldset> <fieldset class="options">  <legend class="question">Send me updates by</legend>  <input id="by-email" type="checkbox" name="updates" value="email">  <label for="by-email">Email</label>  <input id="by-text" type="checkbox" name="updates" value="text">  <label for="by-text">Text message</label></fieldset>

Why this fix: Use native HTML first

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

4 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom, Forced colors

0 of 4 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared group components change.

Limits

This is a starting pattern, not a guarantee for every application. Screen readers differ in how often they repeat a group name, and some read it only on the first option. Custom radio buttons built from div elements need the full radio pattern, with arrow keys and states, which this guide doesn't cover. Groups inside third-party widgets and payment iframes need the same check. Test the complete journey with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work