Here's a basic tooltip example:
<button interesttarget=tooltip>?</button>
<div popover=hint id=tooltip>Tooltip</div>
The desired behavior, for a tooltip, is:
- When the
? button is hovered/focused/etc for a short while ("interest"), the popover will be shown.
- The popover will stay open as long as either the button or the popover are hovered/focused/etc.
- When neither has been hovered/focused/etc for a short while ("interest has been lost"), the popover will be hidden.
It has been proposed, for the "invokers" proposal, to require the action (command) attribute. If that sticks, and is also required here, does that mean there will need to be two more action attributes? For example, we might need showinterestaction and loseinterestaction so that the above example becomes:
<button interesttarget=tooltip showinterestaction=showpopover loseinterestaction=hidepopover>?</button>
<div popover=hint id=tooltip>Tooltip</div>
I don't think a single value (e.g. interestaction=togglepopover) works. Because you could hover the button to show the popover, and then click outside, which will light-dismiss the popover, and then after a short while the "lose interest" event will happen, which will toggle the popover back open. Suppressing the "lose interest" event in this case seems a bit too magic.
Here's a basic tooltip example:
The desired behavior, for a tooltip, is:
?button is hovered/focused/etc for a short while ("interest"), the popover will be shown.It has been proposed, for the "invokers" proposal, to require the action (
command) attribute. If that sticks, and is also required here, does that mean there will need to be two more action attributes? For example, we might needshowinterestactionandloseinterestactionso that the above example becomes:I don't think a single value (e.g.
interestaction=togglepopover) works. Because you could hover the button to show the popover, and then click outside, which will light-dismiss the popover, and then after a short while the "lose interest" event will happen, which will toggle the popover back open. Suppressing the "lose interest" event in this case seems a bit too magic.