w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.21k stars 346 forks source link

Tooltip Pattern: Clarify mouseout dismissal behavior #3140

Closed adampage closed 1 month ago

adampage commented 1 month ago

Resolves #3109.

Preview

Preview revised pattern in compare branch


WAI Preview Link (Last built on Tue, 08 Oct 2024 18:38:04 GMT).

css-meeting-bot commented 1 month ago

The ARIA Authoring Practices (APG) Task Force just discussed Tooltip pattern revision to clarify mouse out behavior.

The full IRC log of that discussion <jugglinmike> Topic: Tooltip pattern revision to clarify mouse out behavior
<jugglinmike> github: https://github.com/w3c/aria-practices/pull/3140
<jugglinmike> Adam_Page: An issue had been filed to point out that our language for the tooltip pattern (about when the content is automatically dismissed on mouseout or hover out) was vague
<jugglinmike> Adam_Page: It didn't account for a WCAG requirement
<jugglinmike> Adam_Page: I wrote a clarification on that topic
<jugglinmike> Adam_Page: preview here: https://deploy-preview-363--aria-practices.netlify.app/aria/apg/patterns/tooltip/#keyboardinteraction
<jugglinmike> Adam_Page: It's in the "keyboard" section
<jugglinmike> Adam_Page: I went ahead and split the details on "hover out" into its own list item and added the clarification there
<jugglinmike> Matt_King: That seems really clear to me
<jugglinmike> Matt_King: I'll paste the wording into the minutes...
<Matt_King> 3. If the tooltip is invoked when a pointing cursor moves over the trigger element, then it is dismissed when the cursor is neither over the trigger nor
<Matt_King> the tooltip.
<jugglinmike> Matt_King: It is clear. I can see how there's a lot of different potential options here
<jugglinmike> Matt_King: Is a tool tip ever not invoked by hover? I'm wondering about the "if" part at the beginning...
<jugglinmike> Matt_King: The previous item says "if it's invoked on focus" so it's always been there
<jugglinmike> Matt_King: Now, when I read it, I'm wondering... Is it sometimes the case that you must click to open the tool tip? I guess that still counts as a tool tip
<jugglinmike> Adam_Page: Yeah. At least at Hilton, we definitely use it. We call it a "toggle tip"
<jugglinmike> Matt_King: I think Sarah popularized that term
<jugglinmike> jongund: Is there anything screen readers do with the role "tooltip"?
<jugglinmike> Matt_King: Not with the actual role, though there's a lot of discussion about that in the related issue.
<jugglinmike> Matt_King: That's a completely separate discussion from this mouse pull request, though
<jugglinmike> Matt_King: Okay, so I understand the "if" part
<jugglinmike> Matt_King: Sometimes when I see "neither [...] nor" I wonder if we can change it to an "either [...] or"
<jugglinmike> Matt_King: We're talking about when it's dismissed, so I guess it wouldn't make sense to say that it remains visible until until the mouse [...]
<jugglinmike> jongund: Maybe "remains open as long as the pointer is over the trigger or the tooltip"
<jugglinmike> Adam_Page: That sounds good. I used the "dismiss" language because I was trying to maintain parity with an earlier item. But jongund's suggestion sounds clearer to me, too
<jugglinmike> Adam_Page: I'll make that revision and push it up to the pull request
<jugglinmike> Matt_King: Cool. Thanks for this!