<fieldset> Element
Technical Summary
The fieldset element represents a group of form controls or other content. Its caption can be provided by the first legend element child.
The important boundaries are separate: grouping semantics, form association, the descendant scope of disabled, the HTMLFieldSetElement interface, and the accessible name derived from legend.
Definition / Categories
| Item | Specification summary |
|---|---|
| Categories | Flow content, listed form-associated element, palpable content |
| Content model | Optionally one legend, followed by flow content |
| Content attributes | Global attributes, disabled, form, and name |
| Tag omission | Neither the start tag nor the end tag is omissible |
| DOM interface | HTMLFieldSetElement |
fieldset is a form-associated element used to structure related controls; it is not itself a value-bearing control that represents every descendant's submission. Each descendant control keeps its own submission conditions.
Legend and content model
<fieldset>
<legend>Contact method</legend>
<label><input type="radio" name="contact" value="email"> Email</label>
<label><input type="radio" name="contact" value="phone"> Phone</label>
</fieldset>
The HTML Standard permits an optional legend followed by flow content. The first legend element child supplies the group caption. Individual controls still need their own names, such as labels.
Form association
fieldset is a listed form-associated element. It may belong to an ancestor form, or its form owner may be set explicitly with the form attribute when the form is in the same document.
<form id="profile-form"></form>
<fieldset form="profile-form" name="contact-group">
<legend>Contact method</legend>
<input name="email" type="email">
</fieldset>
The name attribute is relevant when the fieldset is exposed through form.elements. It does not mean that the fieldset itself contributes a value to the entry list in the same way as its descendant controls.
Disabled propagation
<fieldset disabled>
<legend>Not available yet</legend>
<input name="enabled-by-fieldset">
</fieldset>
When a fieldset has the disabled attribute, descendant form controls are disabled except for controls that are descendants of the first legend element child. Nested fieldsets require the ancestor and first-legend exceptions to be considered together.
| Location | Boundary when the fieldset is disabled |
|---|---|
| Form control outside the first legend | It is affected by the disabled fieldset |
| Form control inside the first legend | Exception to this fieldset's disabled propagation |
| The fieldset itself | Inspect its disabled IDL attribute, form owner, and validation-related APIs separately |
DOM Interface
HTMLFieldSetElement exposes APIs for inspecting the group's state, form owner, and collection of descendant form controls.
const group = document.querySelector('fieldset');
group.disabled;
group.form;
group.name;
group.elements;
group.willValidate;
group.validity;
group.checkValidity();
group.reportValidity();
| API | What to inspect |
|---|---|
disabled | Read or set the fieldset's own disabled attribute as a boolean |
form | The fieldset's form owner, or null |
name | The reflected value of the fieldset's name attribute |
elements | The collection of form controls associated with the fieldset |
validity / checkValidity() | The fieldset's validation interface; distinguish it from the validity of descendant controls |
Accessibility mapping
HTML-AAM maps fieldset through the group role mapping and associates its accessible name with the first rendered legend child. If the legend is hidden from the accessibility tree, it does not provide the accessible name for its parent fieldset.
A CSS border or a generic div cannot replace this structural relationship. Keep the group name in legend, and give each individual control its own accessible name.
Fact / Evidence
Normative claims and implementation observations are recorded separately, with their conditions and verification state.
| Type | Fact / claim | Condition / scope | Status | Evidence |
|---|---|---|---|---|
| SPEC | fieldset groups related form controls and uses the first legend as its caption. | Meaning and content model of fieldset. | Reviewed | HTML Standard: the fieldset element |
| SPEC | The content model permits an optional legend followed by flow content, with disabled, form, and name as relevant attributes. | HTML structure, attributes, and form owner. | Reviewed | HTML Standard: categories and attributes |
| SPEC | fieldset[disabled] disables descendant form controls except descendants of its first legend element child. | Disabled fieldsets, first legend, and nested fieldsets. | Reviewed | HTML Standard: disabled attribute |
| SPEC | HTMLFieldSetElement exposes APIs including disabled, form, name, and elements. | DOM interface for the form-associated element. | Reviewed | HTML Standard: HTMLFieldSetElement |
| AAM | fieldset uses the group mapping and derives its accessible name from the first rendered legend. | HTML-AAM fieldset mapping; a legend hidden from the accessibility tree does not name the parent. | Spec reviewed | HTML-AAM: fieldset |
Evidence
- HTML Standard: The fieldset element — meaning, categories, content model, attributes, form owner, and DOM interface
- HTML Standard: Enabling and disabling form controls — the disabled fieldset conditions
- HTML Accessibility API Mappings: fieldset — group role and the legend-derived accessible name
- Web Platform Tests: disabled element event propagation — test coverage that includes disabled fieldsets
Implementation Evidence
Browser behavior, WPT results, and accessibility observations are tracked separately from normative claims. Unrun items are not treated as reviewed.
Measured fixture / environment: The fixture contains a normal fieldset, a control inside the first legend, a control outside it, a disabled fieldset, a nested fieldset, and a fieldset using form and name inside or alongside <form id="evidence-form">. DOM and form APIs were measured in Chrome 152.0.0.0 (HeadlessChrome / Windows NT 10.0) on 2026-09-13.
| Type | Scope to reproduce | Conditions to record | Status |
|---|---|---|---|
| IMPL | First legend, disabled fieldset, nested fieldsets, form owner, and elements API | Measured result (Chrome 152.0.0.0 / Windows NT 10.0 / 2026-09-13): in a disabled fieldset, the control inside the first legend did not match :disabled, while controls outside it and in a nested fieldset did. fieldset.form resolved the external form owner, and elements excluded the legend control while returning the regular and nested controls. Cross-browser comparison is not covered | Reviewed |
| WPT | Disabled fieldsets, disabled controls, event propagation, and form association | Ran event-propagate-disabled.tentative.html. On 2026-09-15 in Chrome 152.0.0.0 / Windows NT 10.0, 192 of 256 tests passed on wpt.live; 64 could not complete because action_sequence() is not implemented by testdriver-vendor.js. | Partial (192/256 pass) |
| AAM | Group mapping, legend-derived accessible name, and descendant control names and disabled state | Separate browser accessibility-tree observations from platform API and assistive-technology observations | Pending |
Use the WPT repository for test mappings and HTML-AAM for the accessibility mapping baseline.
Coverage / Open Issues
- ReviewedMeaning, categories, content model, legend, disabled, form, and name at the specification level
- ReviewedPrimary HTMLFieldSetElement APIs and the HTML-AAM group / legend mapping
- OpenCross-browser comparisons for disabled propagation, nested fieldsets, and fieldset.elements
- OpenWPT execution, platform accessibility APIs, assistive-technology observations, compatibility, and historical changes
This is an initial coverage page. It does not claim complete verification of the fieldset specification, identical behavior across browsers, or identical announcements across assistive technologies.
Related surface
For a beginner-friendly introduction to grouping and legend, see the fieldset element page in Yugien. Form submission and form owners are covered by the form element; individual control association by the label element; and disabled control states by the input element.