bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

make tooltips hover-able and dismiss-able

Open RyanBerliner opened this issue 4 years ago • 9 comments

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.

Preview Link

Resources

Todo

  • [ ] confirm & revise desired behavior
  • [ ] fix & add tests

RyanBerliner avatar Oct 09 '21 14:10 RyanBerliner

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.

RyanBerliner avatar Oct 28 '21 01:10 RyanBerliner

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 avatar Nov 18 '21 12:11 GeoSot

@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!

RyanBerliner avatar Dec 09 '21 14:12 RyanBerliner

@GeoSot Is this still relevant or can it be closed as stale?

mdo avatar Dec 29 '22 06:12 mdo

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! 👍

RyanBerliner avatar Dec 29 '22 13:12 RyanBerliner

As @RyanBerliner said. He had stopped just to give us time, stabilize the existing implementation . So please can you make a rebase?

GeoSot avatar Dec 30 '22 09:12 GeoSot

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?

RyanBerliner avatar Dec 30 '22 21:12 RyanBerliner

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.

RyanBerliner avatar Jul 08 '24 23:07 RyanBerliner

Great! Finally getting able to hover over tooltips then, so you can also put links in it! Thanks!

carlosmintfan avatar Aug 27 '24 15:08 carlosmintfan