# Radio Buttons With No Question: A Missing Fieldset and Legend (WCAG 1.3.1)

%[https://www.youtube.com/watch?v=l1E4naMvNjQ]

Two options. Nobody asked the question.

The previous episode ended on exactly that promise: radio buttons with no question. [Episode 14](https://www.wasexamprep.com/blog/sticky-header-hides-focus) was about focus you cannot see. This one is about a question you cannot hear.

Everything below uses the [Fieldsets & Legends lab](https://www.wasexamprep.com/go/e15-lab-hashnode). It has three broken cases and their fixed versions:

- **Case 1, Shipping method:** two radio buttons in plain divs under a bold paragraph.
- **Case 2, Notification preferences:** the same pattern with two checkboxes.
- **Case 3, Payment method:** two radio buttons inside a real fieldset, but the heading is a paragraph, not a legend.

## The broken case: answers without a question

Broken Case 1 looks finished. A bold line says "Shipping method", and under it sit two radio buttons, Standard and Express.

In the code, that bold line is a paragraph and the radios sit in plain divs:

```html
<div>
  <p class="font-medium">Shipping method</p>
  <div class="space-y-2">
    <label>
      <input type="radio" name="shipping-broken" value="standard" />
      Standard
    </label>
  </div>
</div>
```

That is the lab's own Implementation snippet. The live example uses `name="shipping"` and has both options; the structure is the same.

Each radio has a label, so each one has an accessible name. They share a `name` attribute, so the browser treats them as one set, and that is where "1 of 2" comes from. But nothing ties the set to the question. In Chrome's accessibility tree, neither radio has a group around it.

## What VoiceOver says

The lab's VoiceOver on Mac capture for Broken Case 1 (`docs/voiceover/forms/fieldsets-legends/broken-output.md`) reads:

`Standard, selected, radio button, 1 of 2`

`Express, selected, radio button, 2 of 2`

Two answers, no question. Name, role, state and position are all there. The one thing missing is what was asked. On a real checkout, with shipping, payment and gift options one after another, a screen reader user hears a run of answers and has to leave the controls to find out which question each set belongs to.

## The rule: WCAG 1.3.1

[Success Criterion 1.3.1 Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html), Level A:

> Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.

Here the relationship is presentation only: bold text above, two options below, close together. A sighted user reads that as one question with two answers. The code never says so.

WCAG documents two sufficient techniques for this:

- [H71](https://www.w3.org/WAI/WCAG22/Techniques/html/H71): group the controls with `fieldset` and name the group with `legend`.
- [ARIA17](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA17): use a grouping role with a label. For radio buttons that means `role="radiogroup"`, labelled with `aria-labelledby`.

Techniques are sufficient, not required. WCAG says content can meet a criterion without any documented technique. But a group with a programmatic name is the documented, well-supported way to meet it.

H71 is also listed under [3.3.2 Labels or Instructions](https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html). In this lab the question is visible on screen. What is missing is the relationship in the code, so 1.3.1 is the criterion to report.

## The trap: a fieldset without a legend

Broken Case 3 is the one that passes a quick code review. "Payment method" sits inside a real `fieldset`, with a border around both radios. But the text is a paragraph, not a `legend`.

Chrome's accessibility tree shows a group with an empty name. The lab's capture agrees:

`Credit card, selected, radio button, 1 of 2`

A fieldset without a legend is a box with no question in it. The legend is what names the group, and H71 says it must be the first element inside the fieldset.

Case 2 is the same pattern with checkboxes. The capture: `Email, unchecked, checkbox`. No question, and no position count either.

## The fix: fieldset and legend

The fixed example changes two elements. The div becomes a `fieldset`, and the paragraph becomes its `legend`:

```html
<fieldset>
  <legend class="font-medium">Shipping method</legend>
  <div class="space-y-2">
    <label>
      <input
        type="radio"
        name="fieldsets-legends-shipping"
        value="standard"
      />
      Standard
    </label>
  </div>
</fieldset>
```

Same labels, same radios, same look. The lab's capture for the fixed Case 1 (`docs/voiceover/forms/fieldsets-legends/fixed-output.md`):

`Standard, selected, radio button, 1 of 2, Shipping method, group`

The question is back. VoiceOver says it after the option, so listen to the end of the announcement. The other two cases follow the same pattern:

`Email, unchecked, checkbox, Notification preferences, group`

`Credit card, radio button, 1 of 2, Payment method, group`

## A testing trap: the second option

Here is the fixed capture for the second option in Case 1:

`Express, selected, radio button, 2 of 2`

That is word for word the broken capture. In the lab's captures, the group name comes with the first option of each group, not with every option. The same holds for Case 2 (SMS) and Case 3 (PayPal).

So if you only listen to an option in the middle of a group, broken and fixed can sound identical. Listen from the first option, and confirm in Chrome's accessibility tree that the group is named after the visible question. The lab's own note says the same: trust the accessibility tree when the group is not spoken.

## The ARIA alternative

If your design really cannot use a fieldset, ARIA17 gives you a container with `role="radiogroup"`, named with `aria-labelledby` pointing at the visible question:

```html
<!-- Illustration, not lab code. The lab has no ARIA case and no VoiceOver capture for it. -->
<p id="ship-q">Shipping method</p>
<div role="radiogroup" aria-labelledby="ship-q">
  <label><input type="radio" name="ship" value="standard"> Standard</label>
  <label><input type="radio" name="ship" value="express"> Express</label>
</div>
```

Native `fieldset` and `legend` come first. They need no ARIA and no ids to keep in sync. [Episode 7](https://www.wasexamprep.com/blog/custom-div-is-not-a-checkbox) made the same case for native controls over rebuilt ones.

## Three limits

- **One question per fieldset.** Group the answers to one question, not the whole form. H71 also warns against nesting fieldsets without a reason.
- **Legend first, and short.** It is read along with the option, so "Shipping method" beats a full sentence of instructions.
- **A lone checkbox needs only its own label.** "I accept the terms" is not a group.

## A two-minute check

1. Turn VoiceOver on and Tab into every group of radio buttons and checkboxes.
2. Listen for the question with the first option. It may come at the end of the announcement.
3. Do not judge by a later option: in the lab's captures, the second option sounds the same in broken and fixed.
4. Open the Accessibility pane in Chrome DevTools on any option. The nearest group should have a name that matches the visible question.
5. A border is not evidence. Check that a `fieldset` actually has a `legend`.
6. If the question lives only on the screen, report 1.3.1 and name the group.

The next episode stays in forms: a required field that never says required.

## Keep practicing

Practice this in the [Fieldsets & Legends lab](https://www.wasexamprep.com/go/e15-lab-hashnode) on [wasexamprep.com](https://www.wasexamprep.com), and review [Form Inputs, Labels, and Instructions](https://www.wasexamprep.com/learn/user-input-forms-dynamic/form-inputs-labels) for the related WAS topics. For labels on single fields, read [Placeholder Text Is Not a Label](https://www.wasexamprep.com/blog/placeholder-is-not-a-label).

[Watch the full walkthrough](https://www.wasexamprep.com/go/e15-hashnode) and subscribe to the [A11Y in Practice YouTube channel](https://www.youtube.com/@a11yinpractice) for more hands-on accessibility episodes.

*A11Y in Practice and wasexamprep.com are independent educational resources. They are not affiliated with or endorsed by IAAP (International Association of Accessibility Professionals).*
