-
Notifications
You must be signed in to change notification settings - Fork 378
fix: update ToggleGroup examples to properly toggle options #12239
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
fix: update ToggleGroup examples to properly toggle options #12239
Conversation
- Update ToggleGroup Single select example to allow toggling off selected options - Update Table Basic example to remove 'Default' option and allow toggling - Update Table Actions example to remove 'Default actions toggle' option and allow toggling - Update Alert Async live region example to remove 'off' option and make single toggle Ensures all ToggleGroup instances follow aria-pressed semantics where clicking a selected option unselects it, and removes redundant 'default' or 'off' options that prevent proper toggle behavior. Fixes patternfly#12234
WalkthroughFour example components are updated to implement proper toggle behavior where clicking a selected option deselects it. Redundant toggle options are removed from alert and table examples, while deselection logic is added to toggle group and table examples. Total changes: 6 lines added, 27 lines removed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview: https://pf-react-pr-12239.surge.sh A11y report: https://pf-react-pr-12239-a11y.surge.sh |
|
@arpanroy41 thank you so much for the contribution!!! 🚀 |
|
@nicolethoen @thatblindgeye Most Welcome. Being a part of Red Hat and a daily user of PF, It's just a head start to me |
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
Fixes #12234
Ensures all ToggleGroup instances follow aria-pressed semantics where clicking a selected option unselects it, and removes redundant 'default' or 'off' options that prevent proper toggle behavior.
Summary by CodeRabbit
Release Notes