[checkbox] Ignore focus while disabled#4998
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,315.51 ms +91.43 ms(+7.5%) | Renders: 50 (+0) | Paint: 1,983.26 ms +155.27 ms(+8.5%)
10 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Code Review (GPT-5.5)Approve ✅ This is a narrow bug fix that correctly blocks disabled Checkbox focus state without expanding the component’s behavior surface. 1. Bugs / Issues (None)I didn’t find any blocking or non-blocking issues in the branch diff. 2. Root Cause & Patch AssessmentThe fix addresses the root cause directly: 3. Test Coverage AssessmentThe added regression test covers the reported disabled-focus case at the component/state-attribute level. I also ran: All passed. GitHub status checks for the PR head are green as well. |
Disabled Checkbox could still set focused field state when focus was moved to it programmatically.
Root cause
Checkbox handled focus without checking
disabled, unlike the related Switch and Radio controls.Changes
data-focused.