make tooltips hover-able and dismiss-able
closes #28411
Makes tooltips wcag 1.4.13 conforming by providing a means to dismiss tooltips without moving the cursor, and allows users to hover the tooltip content. Tooltips are dismissed with the escape key.
Resources
Todo
- [ ] confirm & revise desired behavior
- [ ] fix & add tests
I'm encountering some irregular failures with tests referring to escape key handling in offanvas, dropdown, and modals. Here is an example in the latest test run that only affected off canvas in node v16. So far I haven't been able to replicate these consistently in any node version (12, 14, 16) locally. Sometimes I will get them to fail, but not consistently enough to investigate a cause.
I'm taking this PR out of draft status knowing this still needs to be fixed, and I'm hoping anyone with ideas might be able to shed some light onto what could be causing these failures.
Hey @RyanBerliner
Sorry for keeping this MR stale and many thanks for your contribution. I have planned some clearance and tidiness MRs first for tooltip, in order to increase its maintainability (waiting to be addressed), and will return on this.
Ps: if you want to help us, do not hesitate to ping us on slack
@GeoSot I'm seeing lots of the tooltip tidiness work you mentioned being merged in the past couple weeks. Let me know when you believe most of your refactoring is complete and I can get this pull request rebased at that point. thanks!
@GeoSot Is this still relevant or can it be closed as stale?
FWIW - I am available to rebase and finish this. I've been awaiting confirmation that most of the tooltip refactoring is complete. Please do let me know when that is the case and I'll can get this wrapped up if its still welcomed.
The functionality here has continued to be a highly requested feature from my colleagues over the past year so I'm very interested in getting this completed! 👍
As @RyanBerliner said. He had stopped just to give us time, stabilize the existing implementation . So please can you make a rebase?
I have rebased + refactored this PR to be compatible with all the tooltip changes over the past year. Before I add more tests I'd like to confirm that the behavior implemented is what is expected. Here is what this PR does specifically
- "manual" trigger tooltips receive no change in functionality
- "click" "hover" "focus" triggered tooltips are now dismissible with the escape key
- "hover" "focus" triggered tooltips now allow interaction inside the floating tooltip element with mouse or keyboard
This functionality is currently in place and available to play with at the preview link - is this the desired behavior?
Hi all, it had been a while since I gave this PR any attention. I just did a rebase though and things are still working as intended. If this is still a welcomed addition please let me know your thoughts on the behavior, and upon confirmation/feedback I can get my remaining todo's here wrapped.
Great! Finally getting able to hover over tooltips then, so you can also put links in it! Thanks!