Skip to content

[fieldset] Fix disabled fieldset form bugs#4890

Open
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/fix-fieldset-disabled-form
Open

[fieldset] Fix disabled fieldset form bugs#4890
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/fix-fieldset-disabled-form

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 22, 2026

This is part of the Codex component behavior and test coverage sweep. It fixes Fieldset/Form disabled-state bugs found during review and adds focused test coverage for the affected paths.

Changes

  • Preserve native disabled semantics on Fieldset.Root, including nested fieldsets and render-prop compositions.
  • Stop disabled fieldset controls from registering with Base UI Form validation and submission.
  • Make the Fieldset.Legend missing-root guard reachable.
  • Add coverage for disabled fieldsets, field-aware controls, Form submit values, and Legend root usage.

Original findings addressed

  • [P1] <Fieldset.Root disabled> drops the native disabled attribute.
  • [P1] Fieldset-disabled Field controls still participate in Base UI Form validation and submission.
  • [P2] disabled does not flow through documented Fieldset render compositions.
  • [P2] Nested Base UI fieldsets can shadow an outer disabled fieldset.
  • [P3] The missing-root guard for Fieldset.Legend is dead code.

@atomiks atomiks added type: bug It doesn't behave as expected. component: form Changes related to the form component. component: field Changes related to the field component. labels May 22, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 22, 2026

commit: 54907f6

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 22, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-2B(0.00%) 🔺+12B(+0.01%)

Details of bundle changes

Performance

Total duration: 1,104.64 ms -144.38 ms(-11.6%) | Renders: 50 (+0) | Paint: 1,695.41 ms -199.98 ms(-10.6%)

Test Duration Renders
Popover mount (300 instances) 58.84 ms ▼-16.44 ms(-21.8%) 1 (+0)
Dialog mount (300 instances) 46.54 ms ▼-14.91 ms(-24.3%) 1 (+0)

10 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 54907f6
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a1041f1c0b9950008b52962
😎 Deploy Preview https://deploy-preview-4890--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks atomiks added component: fieldset and removed component: form Changes related to the form component. component: field Changes related to the field component. labels May 22, 2026
@atomiks atomiks changed the title [field] Fix disabled fieldset form bugs [fieldset] Fix disabled fieldset form bugs May 22, 2026
@atomiks atomiks marked this pull request as ready for review May 22, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: fieldset type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant