fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Tooltip in modal/dialog pops up automatically (likely due to first focusable item)

Open eveleens opened this issue 7 years ago • 2 comments

Environment Information

  • Package version(s): (fill this out) 6.195.4
  • Browser and OS versions: (fill this out if relevant) Chrome, at least

Please provide a reproduction of the bug in a codepen:

https://codepen.io/anon/pen/aeLvdQ?&editable=true

This happens moreso when the tooltip is over the "Close/X" button, where we had multiple accessibility bugs stating that we should have the tooltip over the Close button (not a title but a tooltip available for keyboard users). It's especially weird, because it calls out, making the user's eye goes toward closing the modal, not reading the text in the modal.

In the example, I've put the tooltip over the primary button. Note that the tooltip pops up only because it is the first focusable item in the modal. So if the first focusable item is the Close/X button, it'll be on the Close button. But putting a tooltip over the Cancel button doesn't do anything (since PrimaryButton would be the first).

Not sure if this is an actual bug or issues with how this is being implemented.

Actual behavior:

Open the modal - the tooltip pops up automatically.

Expected behavior:

Open the modal - the tooltip doesn't pop up unless you explicitly focus on it

Priorities and help requested:

Are you willing to submit a PR to fix? (Yes, No) Depending on scope and how to fix, sure.

Requested priority: (Blocking, High, Normal, Low) Low

Products/sites affected: (if applicable) Flow

eveleens avatar Aug 02 '19 17:08 eveleens

Hi @eveleens, thanks for submitting this issue. It looks like this behavior is expected as the tooltip show show on focus. An alternative for your specific scenario could be to set the focus on a different element besides the close button when the modal is triggered?

marygans avatar Aug 05 '19 17:08 marygans

This issue has been marked as being beyond the support scope of UI Fabric's issues board. It will now be closed automatically for house-keeping purposes.

msft-github-bot avatar Aug 06 '19 18:08 msft-github-bot