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

Buttons inside a GridListItem are not disabled when the item is disabled #6323

Open
joshuajaco opened this issue May 3, 2024 · 0 comments · May be fixed by #6324
Open

Buttons inside a GridListItem are not disabled when the item is disabled #6323

joshuajaco opened this issue May 3, 2024 · 0 comments · May be fixed by #6324

Comments

@joshuajaco
Copy link
Contributor

joshuajaco commented May 3, 2024

Provide a general summary of the issue here

When using the Button component inside a GridListItem, with the isDisabled prop set to true and disabledBehavior is set to "all", the button is not disabled.

🤔 Expected Behavior?

A button inside a disabled item should be disabled as well. Just like it is already done for checkboxes.

😯 Current Behavior

The button can no longer be focused using the keyboard, but it is not disabled and mouse users can still press it.

💁 Possible Solution

Checkboxes are disabled using the CheckboxContext. The same should be the case for buttons.

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/elastic-pare-vmrszj?file=%2Fsrc%2FApp.js

Untitled.mov

Version

react-aria-components@1.2.0

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

If other, please specify.

No response

What operating system are you using?

MacOS, Windows

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

@joshuajaco joshuajaco linked a pull request May 3, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant