Skip to content

[form controls] Fix hidden input id and required props - #3640

Merged
atomiks merged 1 commit into
mui:masterfrom
atomiks:fix/hidden-input-id
Jan 5, 2026
Merged

atomiks merged 1 commit into
mui:masterfrom
atomiks:fix/hidden-input-id

Conversation

@atomiks

@atomiks atomiks commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor
  1. In Switch, Checkbox, and Radio, when rendering a <button> element, the id will point to the <button> control instead of the hidden <input>, matching Radix and native behavior. Enclosing labels in this format creates invalid HTML, but sibling labels will work correctly by default. Closes Radio hover css behaves differently in Beta 5/6 #3263

  2. In Autocomplete, the required prop is also forwarded to the visible Input part, matching Number Field (but does not apply to Combobox). Also adds aria-required for missing controls (as is currently applied to Checkbox/Radio)

@atomiks atomiks added component: switch Changes related to the switch component. type: bug It doesn't behave as expected. component: checkbox Changes related to the checkbox component. component: radio group Changes related to the radio group component. component: autocomplete Changes related to the autocomplete component. labels Dec 29, 2025
@pkg-pr-new

pkg-pr-new Bot commented Dec 29, 2025 •

Copy link
Copy Markdown
  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@3640
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@3640
    

commit: 604695b

@mui-bot

mui-bot commented Dec 29, 2025 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui/react 🔺+233B(+0.06%) 🔺+80B(+0.06%)

Details of bundle changes


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

@netlify

netlify Bot commented Dec 29, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 604695b
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/695baaea5d489b0008b5126a
😎 Deploy Preview https://deploy-preview-3640--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@atomiks
atomiks marked this pull request as ready for review December 29, 2025 06:10
@atomiks
atomiks force-pushed the fix/hidden-input-id branch from d7778de to 1f24cc2 Compare December 29, 2025 08:03
@atomiks atomiks changed the title [form controls] Fix hidden input id andrequired prop consistency [form controls] Fix hidden input id and required props Dec 29, 2025
@github-actions github-actions Bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Jan 2, 2026
@atomiks
atomiks force-pushed the fix/hidden-input-id branch from 111d96d to 604695b Compare January 5, 2026 12:13
@atomiks
atomiks merged commit d160956 into mui:master Jan 5, 2026
@atomiks
atomiks deleted the fix/hidden-input-id branch January 5, 2026 12:25
atomiks added a commit to atomiks/base-ui that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: autocomplete Changes related to the autocomplete component. component: checkbox Changes related to the checkbox component. component: radio group Changes related to the radio group component. component: switch Changes related to the switch component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Radio hover css behaves differently in Beta 5/6

3 participants