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

[FEAT REQ] Changeable role attribute (v5) #1123

Closed
mailinhdang opened this issue Nov 21, 2023 · 2 comments · Fixed by #1124
Closed

[FEAT REQ] Changeable role attribute (v5) #1123

mailinhdang opened this issue Nov 21, 2023 · 2 comments · Fixed by #1124

Comments

@mailinhdang
Copy link

Is your feature request related to a problem? Please describe.
Regarding the tooltip design pattern of the W3C (https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/), a tooltip should "not receive focus. A hover that contains focusable elements can be made using a non-modal dialog".
Currently, I have a use case where my tooltip contains multiple buttons or links. Hence, my tooltip should rather be a non-modal dialog and for dialogs, you usually set role=dialog instead of role=tooltip.

Describe the solution you'd like
Making the role of the tooltip component a changeable property or adding a prop asDialog would be very helpful to set the correct role attribute.

@mailinhdang mailinhdang changed the title [FEAT REQ] Changeable role attribute [FEAT REQ] Changeable role attribute (v5) Nov 21, 2023
@gabrieljablonski
Copy link
Member

Definitely doable. You're welcome to submit a PR if you'd like. If not, we'll probably get around to this in a few days.

Thanks for the suggestion.

@danielbarion danielbarion added the Awaiting merge Issue is fixed on a PR that will me merged soon. label Nov 21, 2023
@gabrieljablonski gabrieljablonski removed the Awaiting merge Issue is fixed on a PR that will me merged soon. label Nov 21, 2023
@gabrieljablonski
Copy link
Member

Available on official release react-tooltip@5.24.0

Thanks @mailinhdang for the contribution!

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

Successfully merging a pull request may close this issue.

3 participants