Fixing Radio Groups and CAPTCHA Accessibility in Visual Form Builder

Fixing Radio Groups and CAPTCHA Accessibility in Visual Form Builder

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

Legacy WordPress form plugins like Visual Form Builder often render radio button groups inside plain <div> or <ul> wrappers without <fieldset> and <legend> semantics, and output spam-prevention CAPTCHA fields without programmatic labels or instructions. Screen reader users hear isolated radio choices like "Yes" or "No" without knowing what question is being asked, and cannot tell what value the CAPTCHA input expects.

Why This Pattern Violates WCAG

WCAG 1.3.1 Info and Relationships (Level A) requires grouped controls such as radio buttons to expose their shared group question programmatically via <fieldset> and <legend> or role="radiogroup" with aria-labelledby.

WCAG 3.3.2 Labels or Instructions (Level A) and WCAG 4.1.2 Name, Role, Value (Level A) require every CAPTCHA input and verification field to have an explicit accessible label and clear instructions for completing the challenge.

Code Comparison

Inaccessible Visual Form Builder Radio & CAPTCHA Markup

<div class="vfb-item">
  <label>Preferred Contact Method</label>
  <div>
    <input type="radio" name="vfb-12" id="vfb-12-0" value="Email">
    <label for="vfb-12-0">Email</label>
    <input type="radio" name="vfb-12" id="vfb-12-1" value="Phone">
    <label for="vfb-12-1">Phone</label>
  </div>
</div>
<div class="vfb-item">
  <span>Please enter any two digits:</span>
  <input type="text" name="vfb-secret" id="vfb-secret">
</div>

Compliant Grouped Fieldset and Labeled Verification Field

<fieldset class="vfb-item">
  <legend>Preferred Contact Method</legend>
  <div>
    <input type="radio" name="vfb-12" id="vfb-12-0" value="Email">
    <label for="vfb-12-0">Email</label>
    <input type="radio" name="vfb-12" id="vfb-12-1" value="Phone">
    <label for="vfb-12-1">Phone</label>
  </div>
</fieldset>
<div class="vfb-item">
  <label for="vfb-secret">Spam verification (enter any two digits)</label>
  <input type="text" name="vfb-secret" id="vfb-secret" required aria-required="true">
</div>

How to Fix It in WordPress

  • Wrap every radio button or checkbox group in a semantic <fieldset> with a descriptive <legend> matching the group prompt.
  • Ensure spam-protection or CAPTCHA inputs have a properly associated <label for="…"> element and clear accessible instructions.
  • Test every form field using a screen reader or keyboard-only navigation before publishing.

Finding This Issue Automatically

Because Visual Form Builder outputs its form markup dynamically through plugin shortcodes, manual template edits are often overwritten on plugin updates. The WP ADA Compliance Check plugin automatically detects and corrects radio groups and CAPTCHA field accessibility issues in Visual Form Builder output on the fly.

Subscribe

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

Cart Accessibility Tools
hide