Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Components: Add disabled prop to CheckBoxControl #69726

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

im3dabasia
Copy link
Contributor

What?

Adds support for disabled state in CheckboxControl.
Closes #59411

Why?

Issue #59364 identified the need for a disabled state on CheckboxControl for better accessibility and user experience in forms.

How?

  1. Added styling for for the disabled state
  2. Ensured onChange handler is bypassed when aria-disabled is true

Testing Instructions

  1. Run npm run storybook:dev
  2. Navigate to the CheckboxControl component
  3. Test different disabled states and verify styling
  4. Ensure disabled checkboxes cannot be toggled
  5. Test keyboard navigation with both regular and focusable disabled checkboxes

Screencast

Screen.Recording.2025-03-27.at.3.23.01.PM.mov

@im3dabasia im3dabasia requested a review from ajitbohra as a code owner March 27, 2025 09:56
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: mirka <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components Needs Design Feedback Needs general design feedback. labels Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CheckboxControl: Add disabled state
2 participants