fix(Button): updated rendering of aria-disabled attribute#11478
Merged
wise-king-sullyman merged 4 commits intopatternfly:mainfrom Jan 28, 2025
Merged
fix(Button): updated rendering of aria-disabled attribute#11478wise-king-sullyman merged 4 commits intopatternfly:mainfrom
wise-king-sullyman merged 4 commits intopatternfly:mainfrom
Conversation
Collaborator
|
Preview: https://patternfly-react-pr-11478.surge.sh A11y report: https://patternfly-react-pr-11478-a11y.surge.sh |
nicolethoen
approved these changes
Jan 27, 2025
| ); | ||
| const _children = children && <span className={css('pf-v6-c-button__text')}>{children}</span>; | ||
| // We only want to render the aria-disabled attribute when true, similar to the disabled attribute natively. | ||
| const shouldRenderAriaDisabled = isAriaDisabled === true || (!isButtonElement && isDisabled === true); |
Collaborator
There was a problem hiding this comment.
Nit: Do these need to have explicit === true checks?
| const button = screen.getByRole('button'); | ||
|
|
||
| expect(button).toHaveAttribute('aria-disabled', 'true'); | ||
| expect(button).toHaveClass('pf-m-aria-disabled'); |
Collaborator
There was a problem hiding this comment.
Nit: why are we hard coding the class name here but not in the other new tests?
8f2e537 to
e2ecf21
Compare
wise-king-sullyman
approved these changes
Jan 28, 2025
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
mattnolting
pushed a commit
to mattnolting/patternfly-react
that referenced
this pull request
Feb 14, 2025
…#11478) * fix(Button): updated rendering of aria-disabled attribute * Updated other component snapshots * Addressed Austin feedback * Updated test name to use styles object
This was referenced Mar 6, 2025
1 task
KKoukiou
pushed a commit
to rhinstaller/anaconda-webui
that referenced
this pull request
Jun 26, 2025
And adjust tests to reflect the change in the aria-disabled property, which not does not exist when it's set to false. [1] [1] patternfly/patternfly-react#11478
KKoukiou
pushed a commit
to rhinstaller/anaconda-webui
that referenced
this pull request
Jul 22, 2025
And adjust tests to reflect the change in the aria-disabled property, which not does not exist when it's set to false. [1] [1] patternfly/patternfly-react#11478
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Closes #11462
Additional issues: