Skip to content

Conversation

kmcfaul
Copy link
Contributor

@kmcfaul kmcfaul commented Feb 19, 2025

What: Closes #10846

The issue is due to the help text button actually being a span with role="button"/tab-index="0", which doesn't have keyboard interaction automatically like a button element does. The popover uses a click event to trigger.

This could also be solved by changing the element to a button, but I couldn't get the styling to work out, and I'm not sure it's valid HTML to nest a button inside a dt.

@patternfly-build
Copy link
Contributor

patternfly-build commented Feb 19, 2025

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.

Works great! Not using an actual button element should be fine now since we're covering the logic for keyboard handling.

Would you mind opening a followup to add a Cypress test to check that help text can be triggered via mouse and keyboard? Unless you want to take a stab at it here, just not sure how involved it'll be in Cypress.

@kmcfaul
Copy link
Contributor Author

kmcfaul commented Feb 20, 2025

Opening a followup for now, I don't think this PR needs to wait for the test to go in at least.

@mfrances17 mfrances17 merged commit 4250f67 into patternfly:main Feb 24, 2025
13 checks passed
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.

Bug - [Description List] - [term help text popover not accessible by keyboard navigation]

4 participants