What’s the difference between a fieldset and a radio group?

Question

What is the main difference between a fieldset and a radio group?

Answer

A significant difference between a fieldset and a radio group is that a fieldset is a native HTML element (<fieldset>), whereas a radio group is a custom element with a WAI-ARIA role (role="radiogroup").

The fieldset HTML element is used to group related elements and labels in a form. A fieldset can group radio buttons, but is flexible for grouping other types of elements as well.

A radio group contains a set of radio buttons. Radio buttons present options, and no more than one radio button within a radio group can be selected at a time.

Using native elements for their intended purpose is always recommended, so if possible use native <input type="radio"> elements. If you are creating a set of radio buttons, these can be grouped with each other and with the corresponding question using <fieldset> and <legend> elements, or by using a custom element with the radiogroup role.

For step-by-step support reviewing the accessibility of forms and other interactive web content, explore the Guided Manual WCAG Audit Tool from Accessible Web.

Free Tools to Continue Learning

Accessible Web Company Logo

Accessible Web RAMP

Monitor your website and manage your progress towards WCAG conformance.

Accessible Web Company Logo

Accessible Web Academy

Career specific courses to help power up your accessibility knowledge.