Radio or checkbox group has no group label

  • WCAG 1.3.1 Info and Relationships, level A
  • Moderate
  • Forms
  • Automated
  • Server pass

Why it matters

Each radio button has its own label, but people also need the question. Without a group name a screen reader just says "Yes, radio button".

How to fix it

Wrap the group in a <fieldset> with a <legend> that holds the question.

<fieldset>
  <legend>How should we contact you?</legend>
  <label><input type="radio" name="c" value="email"> Email</label>
  <label><input type="radio" name="c" value="phone"> Phone</label>
</fieldset>

Read the W3C guidance: Understanding 1.3.1 Info and Relationships.

Related rules

Find this on your own site. A11yMate scans every page and lists where it happens. See pricing or browse all rules.