Skip to content

fix(Button): updated AriaExpanded to apply correctly - #7893

Merged
thatblindgeye merged 1 commit into
patternfly:mainfrom
thatblindgeye:jumplinksRemoveIsAria
Oct 15, 2025
Merged

thatblindgeye merged 1 commit into
patternfly:mainfrom
thatblindgeye:jumplinksRemoveIsAria

Conversation

@thatblindgeye

Copy link
Copy Markdown
Contributor

Closes #7892

Tried going for the quicker solution for now:

  • Updated Button hbs so that the if block for button--AriaExpanded uses the concat helper; this should apply aria-expanded correctly when button--AriaExpanded is passed a boolean false value as well as a truthy value
  • Added ternary helpers to components using button--AriaExpanded to have false as a fallback

Just need douible checked in reivew:

  • aria-expanded is set with a true or false value for expandable things (true when expanded, false when collapsed)
  • aria-expanded isn't incorrectly rendered if the thing isn't expandable (e.g. a basic primary button shouldn't have aria-expanded)

I also added a comment for the concat helper I added for now, I think we could probably have a followup to clean up how we're passing in button--AriaExpanded based on other component attributes (e.g. jump-links--IsExpanded is explicitly passed a stringy "true", but needs to be passed a boolean false otherwise a stringy "false" will set pf-m-expanded on the jump links.

@thatblindgeye
thatblindgeye requested a review from mcoker October 15, 2025 17:30
@patternfly-build

patternfly-build commented Oct 15, 2025 •

Copy link
Copy Markdown
Collaborator

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

L🎃TM!

@thatblindgeye
thatblindgeye merged commit 006b603 into patternfly:main Oct 15, 2025
4 of 5 checks passed

@dlabaj dlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@patternfly-build

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.4.0-prerelease.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - Button - AriaExpanded not set correctly for false value

4 participants