Skip to content

Adds close tooltips with esc key to meet WCAG #440

Merged
zoltanszogyenyi merged 3 commits intothemesberg:mainfrom
daveholst:main
Feb 15, 2023
Merged

Adds close tooltips with esc key to meet WCAG #440
zoltanszogyenyi merged 3 commits intothemesberg:mainfrom
daveholst:main

Conversation

@daveholst
Copy link
Contributor

We are currently undergoing a WCAG audit on our site and reskinning it with flowbite. We were penalised for not having our tooltips close with the escape key and I noticed that the flowbite tooltips also behave the same. I have used the modal esc key event listeners, modified them slightly and bought them into here.

Please let me know if you think this is a suitable solutons.

Loving flowbite, thanks for all the hard work!

https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/

@zoltanszogyenyi
Copy link
Member

Hello @daveholst,

Thanks for the PR and super appreciate the work! Flowbite is primarily an open-source software so it is really great when others also contribute as I cannot possibly cover all cases at once.

I've checked the PR and things look good - can you please do the same for the Popover component? They are very similar in behaviour that way we can make sure that both off-canvas cases of tooltips and popovers are WCAG compatible.

Cheers,
Zoltan

@daveholst
Copy link
Contributor Author

Thanks for the quick reply @zoltanszogyenyi. As requested, I have applied the same changes to the popover component.

Cheers.

@zoltanszogyenyi
Copy link
Member

Thanks @daveholst - I'll have it checked this week and merged if no further changes are required.

@zoltanszogyenyi
Copy link
Member

Hey @daveholst - I've checked out the PR and added the new class functions to their apropiate interfaces. Merged and thanks for the contribution! This will be deployed for v1.6.4.

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.

2 participants