Fieldsets Without Legends

Fieldsets Without Legends

WCAG Focus: WCAG 1.3.1 (A), 3.3.2 (A)

When a WordPress form asks a multiple-choice question—such as three radio buttons labeled "Yes", "No", and "Maybe"—a screen reader moving through the radio buttons reads only "Yes, radio button" unless the overarching question is bound to the group via <fieldset> and <legend>.

Why This Pattern Violates WCAG

WCAG 1.3.1 Info and Relationships (Level A) and Technique H71 require wrapping related radio buttons or checkboxes in a <fieldset> with a descriptive <legend> so the group prompt is announced automatically.

Code Comparison

Inaccessible Fieldset Missing Legend

<fieldset>
  <p>Preferred Contact Method:</p>
  <label><input type="radio" name="contact" value="email"> Email</label>
  <label><input type="radio" name="contact" value="phone"> Phone</label>
</fieldset>

Compliant Fieldset and Legend

<fieldset>
  <legend>Preferred Contact Method</legend>
  <label><input type="radio" name="contact" value="email"> Email</label>
  <label><input type="radio" name="contact" value="phone"> Phone</label>
</fieldset>

How to Fix It in WordPress

  • Include a <legend> as the very first child inside every <fieldset>.
  • Keep <legend> text concise so screen readers do not repeat a full paragraph on every option.

Finding This Issue Automatically

Even seasoned developers omit <legend> tags inside custom WordPress survey or registration forms. The WP ADA Compliance Check plugin flags fieldsets missing legends across your site and even automatically corrects radio groups and captcha fields in supported builders like Visual Form Builder.

WCAG References & Supporting Materials

WCAG Success Criteria

Supporting Documentation & Guides

Subscribe

Subscribe to receive daily Web Accessibility - Did you know? articles in your inbox.

Cart Accessibility Tools
hide