-
Notifications
You must be signed in to change notification settings - Fork 355
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
feat(Button): change behaviour of isDisabled prop #10255
Conversation
Preview: https://patternfly-react-pr-10255.surge.sh A11y report: https://patternfly-react-pr-10255-a11y.surge.sh |
07c2356
to
16c555f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSS wise looks good, non blocking comment below. The disabled buttons with count examples don't match v6 Core staging, but there's an issue open in Core for updating disabled badge styling for that variant already which should take care of that: patternfly/patternfly#6558
@@ -161,13 +161,13 @@ const ButtonBase: React.FunctionComponent<ButtonProps> = ({ | |||
<Component | |||
{...props} | |||
{...(isAriaDisabled ? preventedEvents : null)} | |||
aria-disabled={isDisabled || isAriaDisabled} | |||
aria-disabled={isAriaDisabled || (!isButtonElement && isDisabled)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker since overall it doesn't negatively affect anything, but this will always render an aria-disabled prop, sometimes when not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good point, there will be the unnecessary aria-disabled="false"
.
I created a followup issue for this: #10340, if you feel like we don't need this update, you can close it
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #10210