<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>314344</bug_id>
          
          <creation_ts>2026-05-07 14:03:09 -0700</creation_ts>
          <short_desc>Add support for readonly in fieldset</short_desc>
          <delta_ts>2026-05-07 14:43:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>teo.eterovic</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2208713</commentid>
    <comment_count>0</comment_count>
    <who name="">teo.eterovic</who>
    <bug_when>2026-05-07 14:03:09 -0700</bug_when>
    <thetext>I&apos;ve opened a draft PR for: https://github.com/whatwg/html/issues/10293 (see last comment for details) and PR: https://github.com/whatwg/html/pull/12424

The approach mirrors disabled: a readonly attribute on &lt;fieldset&gt; propagates read-only state to descendant &lt;input&gt; (in states where readonly is meaningful), &lt;textarea&gt;, and form-associated custom elements. 

Controls like checkbox, radio, button, and &lt;select&gt; are unaffected. Anything inside the first &lt;legend&gt; child is excluded. 

A formReadonlyCallback is introduced on form-associated custom elements parallel to formDisabledCallback.

This would create behavior consistent with the disabled attribute, but the real benefit would be to use it for web components that have form association implemented to be handled through a form manager - for example dynamic forms / form builder.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2208726</commentid>
    <comment_count>1</comment_count>
    <who name="">teo.eterovic</who>
    <bug_when>2026-05-07 14:43:45 -0700</bug_when>
    <thetext>**Spec issue:** https://github.com/whatwg/html/issues/10293

**Spec PR:** https://github.com/whatwg/html/pull/12424

**WPT tests (tentative):** https://github.com/web-platform-tests/wpt/pull/59741

## Summary

Add a `readonly` content attribute to `&lt;fieldset&gt;` that propagates a
read-only state to descendant form controls that support being readonly,
mirroring the existing `disabled` attribute on `&lt;fieldset&gt;`.

## Behavior

- The attribute is reflected as `HTMLFieldSetElement.readOnly`
- Affected descendants:
  - `&lt;input&gt;` in states that support readonly (text, search, url, tel,
    email, password, date, month, week, time, datetime-local, number)
  - `&lt;textarea&gt;`
  - Form-associated custom elements, via a new `formReadonlyCallback`
- Unaffected: checkbox, radio, file, button/submit/reset/image,
  range, color, hidden, `&lt;button&gt;`, `&lt;select&gt;`
- Descendants of the first `&lt;legend&gt;` element child are exempt
  (matching the `disabled` exemption)
- Nested fieldsets propagate; the legend exemption applies per fieldset
  and does not extend to legends of nested fieldsets

## Why

Authors today have to manually toggle `readonly` on every form control
inside a section. `&lt;fieldset disabled&gt;` already provides bulk disabling;
read-only state — which is semantically distinct (values still submit,
focus and selection still work) — has no equivalent.
This is also very useful for web components - Form-Associated Components attachInternals

## Tests

WPT tests are landed as `.tentative` at
`html/semantics/forms/the-fieldset-element/readonly-*.tentative.html`.
They will turn green once this is implemented.

## Asking for

Implementer signal on the WHATWG PR checklist — please leave a comment
on https://github.com/whatwg/html/pull/12424 indicating
interest (or concerns), and link this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>