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

fix(Popover): a11y aria props applied to child target, not wrapper #6604

Merged

Conversation

bvandercar-vt
Copy link
Contributor

@bvandercar-vt bvandercar-vt commented Dec 15, 2023

aria-expanded and aria-haspopover should be applied to the interactive element, which is the passed child target, not the span wrapper. Compared to the span wrapper, the child element is the interactive element because A) it is likely to be an interactive element such as a <Button> and B) it's what gets the tabIndex prop.

@bvandercar-vt
Copy link
Contributor Author

@adidahiya passing now

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

there is some risk to this change as it touches a very fundamental component, but I think it's the right direction to move in. We had to make a similar attribute change in one of our apps due to a11y checks failing on the popover target element, so it would be great if Popover fixed this across the board for everyone by applying these aria- attributes on the correct DOM element.

@adidahiya adidahiya merged commit d8a5e6a into palantir:develop Jan 4, 2024
12 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.

None yet

2 participants