Skip to content

[DRAFT] Add readonly attribute to fieldset element#12424

Open
teoeter wants to merge 1 commit intowhatwg:mainfrom
teoeter:fieldset-readonly
Open

[DRAFT] Add readonly attribute to fieldset element#12424
teoeter wants to merge 1 commit intowhatwg:mainfrom
teoeter:fieldset-readonly

Conversation

@teoeter
Copy link
Copy Markdown

@teoeter teoeter commented May 7, 2026

Add readonly attribute to fieldset element, propagating read-only state to descendant form controls that support it — mirroring how fieldset disabled works.

Closes #10293

(See WHATWG Working Mode: Changes for more details.)

Changeset

  • Adds readonly content attribute and readonly IDL attribute to HTMLFieldSetElement
  • Defines concept-fieldset-readonly and concept-fe-readonly parallel to the existing disabled concepts
  • Propagates readonly to input elements (where readonly applies), textarea, and form-associated custom elements - excluding legend descendants
  • Adds formReadonlyCallback to form-associated custom elements, parallel to formDisabledCallback
  • Adds an entry to the attributes table
  • Adds an example

/acknowledgements.html ( diff )
/custom-elements.html ( diff )
/form-control-infrastructure.html ( diff )
/form-elements.html ( diff )
/index.html ( diff )
/indices.html ( diff )

Adds a readonly content attribute to fieldset that propagates read-only
state to descendant form controls that support it, mirroring how the
existing disabled attribute works.

Affected descendants are input elements in states that support readonly,
textarea elements, and form-associated custom elements. Controls for
which readonly is not meaningful (checkbox, radio, button, select) are
unaffected, as is anything inside the first legend child.

Introduces concept-fe-readonly parallel to concept-fe-disabled, and
formReadonlyCallback on form-associated custom elements parallel to
formDisabledCallback.

Closes whatwg#10293
@teoeter teoeter force-pushed the fieldset-readonly branch from 730c13f to 10c90d5 Compare May 8, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fieldset should support readonly attribute

1 participant