adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.21k stars 192 forks source link

[Bug]: Tooltip does not appear on keyboard focus #4482

Closed mjawili closed 1 month ago

mjawili commented 1 month ago

Code of conduct

Impacted component(s)

sp-tooltip

Expected behavior

Tooltips should be shown on focus. The two examples in the Tooltip: Self-managed overlays section should be triggered on keyboard focus (just like in Safari).

Actual behavior

The tooltip is not triggered by focus. The two examples in the Tooltip: Self-managed overlays section don't actually work for keyboard users on Chrome, Firefox, and Edge. The tooltip isn't triggered on keyboard focus, Enter press, or Space press.

From @Westbrook (in a Slack thread): :grimacing: Looks like that's the cost of ignoring your own lint rules: https://github.com/adobe/spectrum-web-components/commit/79337ff0c8df69203877732ce0541d9f1d49f33d#diff-679cce9f52f6181d77d[…]31ec5a3ea67bc8e7fR36-R37

Screenshots

https://github.com/adobe/spectrum-web-components/assets/698736/df3d6c93-a2bd-4713-9d53-7f15473cd02c

What browsers are you seeing the problem in?

Firefox, Chrome, Microsoft Edge

How can we reproduce this issue?

  1. Go to https://opensource.adobe.com/spectrum-web-components/components/tooltip/#self-managed-overlays
  2. Tab to the Trigger button.

Notice that the tooltip is not displayed.

Sample code that illustrates the problem

No response

Logs taken while reproducing problem

No response

mjawili commented 1 month ago

Looks like PR 4443 fixes this issue. 😊