Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ If you have previously implemented any breakpoint logic based on a pixel value,
#### Button

1. *Cannot find aria-disabled*
- **Cause:** We changed the `isDisabled` prop to assign a value for `disabled`, but none for `aria-disabled`.
- **Fix:** Remove tests that look for `aria-disabled` in buttons.
- **Cause:** We changed button's `isDisabled` prop to assign a value for `disabled`, but none for `aria-disabled` - except for when the `component` prop is passed anything other than "button" as a value. Additionally, `aria-disabled` will now only render when true.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Cause:** We changed button's `isDisabled` prop to assign a value for `disabled`, but none for `aria-disabled` - except for when the `component` prop is passed anything other than "button" as a value. Additionally, `aria-disabled` will now only render when true.
- **Cause:** We changed button's `isDisabled` prop to assign a value for `disabled`, but none for `aria-disabled`. The exception to this is when the `component` prop is passed anything other than "button" as a value. Additionally, `aria-disabled` will now only render when true.

- **Fix:** Remove tests that look for `aria-disabled` in buttons when the expectation is for it to be false, or to match `isDisabled` when `component="button"`.
Copy link
Copy Markdown
Collaborator

@edonehoo edonehoo Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **Fix:** Remove tests that look for `aria-disabled` in buttons when the expectation is for it to be false, or to match `isDisabled` when `component="button"`.
- **Fix:** Remove tests that look for `aria-disabled` in buttons when the expectation is either:
- For `aria-disabled` to be false.
- For `aria-disabled` to match `isDisabled` when `component="button"`.

I'm not sure if I'm correctly interpreting the end of the sentence. I took it like there are 2 instances where you should remove these tests (the suggestion above and also below)

I can also interpret it like this:

Fix: Either:
- Remove tests that look for aria-disabled in buttons, when the expectation is for aria-disabled to be false.
- Match aria-disabled to isDisabled when component="button".


1. *Cannot find button attributes when using byText*
- **Cause:** We added a wrapping `div` around button text. The RTL `byText` query returns that wrapper instead of the button element itself, where button's attributes live.
Expand All @@ -199,4 +199,4 @@ Reach out to us on Slack
Ask a question in GitHub Discussions
</Button>

**Note:** If you use a custom solution to replicate PatternFly styling (without using PatternFly components), then your product will need to be re-skinned. This may be a large undertaking, so we encourage you to get help from the PatternFly team.
**Note:** If you use a custom solution to replicate PatternFly styling (without using PatternFly components), then your product will need to be re-skinned. This may be a large undertaking, so we encourage you to get help from the PatternFly team.