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

feat(Button): change behaviour of isDisabled prop #10255

Merged
merged 3 commits into from
May 3, 2024

Conversation

adamviktora
Copy link
Contributor

What: Closes #10210

@adamviktora adamviktora requested review from a team, tlabaj, kmcfaul and mattnolting and removed request for a team April 8, 2024 10:27
@patternfly-build
Copy link
Contributor

patternfly-build commented Apr 8, 2024

Copy link
Contributor

@thatblindgeye thatblindgeye left a 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)}
Copy link
Contributor

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.

Copy link
Contributor Author

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

@thatblindgeye thatblindgeye merged commit fe6683f into patternfly:v6 May 3, 2024
13 checks passed
@patternfly-build
Copy link
Contributor

Your changes have been released in:

Thanks for your contribution! 🎉

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 this pull request may close these issues.

v6 Button - prevent aria-disabled from being set by isDisabled prop
6 participants