Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross behavior between focus and hover (1.4.13) #1196

Closed
idoros opened this issue Jul 7, 2020 · 22 comments
Closed

Cross behavior between focus and hover (1.4.13) #1196

idoros opened this issue Jul 7, 2020 · 22 comments

Comments

@idoros
Copy link

idoros commented Jul 7, 2020

  • Persistent: The additional content remains visible until the hover or focus trigger is removed, the user dismisses it, or its information is no longer valid. - link

What should be the cross behavior between focus and hover:

case 1: focus a button -> tooltip appears -> move mouse over the tooltip or button -> tab to blur button (not into overlay content).

should the mouse keep the tooltip alive until it moves out?

case 2: focus a button -> tooltip appears -> move mouse over and then out.

should the tooltip disappear?


My intuition is that no matter how a tooltip opened, holding the mouse pointer on it is like another focus point that should keep the tooltip content persistent even when the actual focus is moved a away (esc should still close even when mouse is on content). Given this thinking, when the tooltip is invoked by the focus, a mouse might dismiss it by waving it away like esc would.

On the other hand the trigger that opened the tooltip (or other focus/hover UI) could be considered as THE way to close it, so mouse will never close a popup that was opened by focus and vice versa.

Another option is that both mouse out and blur removes the content without regards to how it was opened or if any additional triggers are currently in effect.

@JAWS-test
Copy link

IE 11 displays tooltips with the title attribute on mouseover and on focusing with the keyboard. So you could use the behavior of the browser as a guide (if you think IE 11's behavior makes sense).

  • If mouse is over the target and the keyboard focus is moved to or from the target, the tooltip is removed.
  • If keyboard focus is on the target and the mouse is moved to the target or away from the target, the tooltip is also removed.

@idoros
Copy link
Author

idoros commented Jul 7, 2020

  • If mouse is over the target and the keyboard focus is moved to or from the target, the tooltip is removed.
  • If keyboard focus is on the target and the mouse is moved to the target or away from the target, the tooltip is also removed.

so almost my third option: "...both mouse out and blur removes the content without regards to how it was opened or if any additional triggers are currently in effect."

The only thing that sound weird in this behavior is that mouse over or focus on the target would close the tooltip.

@JAWS-test
Copy link

The only thing that sound weird in this behavior is that mouse over or focus on the target would close the tooltip.

To be more precise: If the keyboard focus is on the target and the mouse is not, the tooltip will disappear when the mouse is moved. However, the moment the mouse reaches the target, the tooltip is faded in again due to mouseover.

@idoros
Copy link
Author

idoros commented Jul 7, 2020

To summarize all the flows as I understand them:

content not visible:

  • focus anchor -> content appear
  • mouse over anchor -> delay -> content appear

content visible

  • mouse moves outside -> delay -> content disappears
  • mouse moves outside -> delay -> mouse over anchor (or content) -> content persist
  • mouse moves outside -> delay -> focus anchor (or content) -> content persist
  • focus out -> content disappears (no delay, doesn't matter where the mouse is)
  • escape pressed -> content disappears (no delay, doesn't matter where the mouse or focus are)

@alastc
Copy link
Contributor

alastc commented Jul 13, 2020

A draft proposed response to put to the group:

The success criteria text specified that “The additional content remains visible until the hover or focus trigger is removed". So the requirement is that if the content is triggered by hover, it stays until the hover is removed. If it is triggered by focus then it stays until the focus is removed (or one of the other options are used as specified).

There are various usability connotations of how the other type trigger might interact with the trigger, but there is no direct requirement except that it should not cause the additional content to disappear.

@idoros
Copy link
Author

idoros commented Jul 14, 2020

if the content is triggered by hover, it stays until the hover is removed. If it is triggered by focus then it stays until the focus is removed (or one of the other options are used as specified)

So the trigger maintain the visibility of the content - as long as the focus is on, the content is visible and the mouse cannot toggle it, and also mouse over should keep the content visible even on blur? does it matter which action triggered the content first, or do you think that the first trigger should display the content and the last trigger off should hide it?

There are various usability connotations of how the other type trigger might interact with the trigger, but there is no direct requirement except that it should not cause the additional content to disappear.

It's not clear to me, at first it sounds like there is ambiguity about the interactions between triggers, but at the end you say that a trigger shouldn't cancel another trigger?

@mraccess77
Copy link

I would like official confirmation that indeed the SC only covers the combinations mentioned by @alastc -- that is if you initiate the additional content on focus and not hover then hover would not be taken into account in testing and vice versa for meeting the SC.

@detlevhfischer
Copy link
Contributor

There was a previous discussion in #582 which led to a survey where the issue was deferred to WCAG 2.2 - so maybe there's an opportunity to clarify the language now?

@alastc
Copy link
Contributor

alastc commented Jul 17, 2020

@detlevhfischer - thanks for the reminder on that older issue. It isn't quite the same thing, but got me in the headspace again.

@mraccess77 - that's why we survey these things, I'm not the arbiter! I made the proposal based on my reading of the SC text, and what we've said previously. If you have a counter-proposal/interpretation please put it forward.

@idoros - What I'm proposing (but is not agreed yet) is that the the 'mode' which triggered it (hover or focus) is the crux of the SC language, so the other mode is not applicable.

Taking two scenarios:

  • You hover over something, content appears, you then tab through, the on-blur may or may not trigger the content to disappear.
  • You tab through and content appears, then you mouse-into the same triggering item and mouse-out, the content may or may not disappear.

But, it in each case the content must disappear when the triggering mode is removed. That's what I'm proposing, but we'll run it past the group as I could be missing something.

@mraccess77
Copy link

To clarify my question -- if you cause the additional content to appear on focus - all of the provisions around dismiss on hover still apply -- that is the mode of triggering does not change the 3 requirements be satisfied.

@alastc
Copy link
Contributor

alastc commented Aug 4, 2020

New response needed, based on either hover or focus being used to close the new content.

@scha14
Copy link
Contributor

scha14 commented Aug 8, 2020

A draft proposed response to put to the group:

If the user is using one method (focus or hover) - if the content is triggered by hover, it stays until the hover is removed. If it is triggered by focus then it stays until the focus is removed (or one of the other options are used as specified).

If the user is switching input methods - if the element with additional content has mouse hover and later keyboard focus (or vice versa), the additional content persists until either the mouse is hovered away, or until keyboard focus is moved away from the element.

@mraccess77
Copy link

The bit I'd like to understand is the situation where the user focuses something with the keyboard but then has to move the mouse pointer to pan a magnified screen - because they used the keyboard focus as a trigger for the additional content does not need to persist and can close when the pointer is moved. Is this acceptable for users with low vision? Was this concerned in creation of the text and was this meant to be covered or not? That is I'm seeking to understand the intention in order to interpret what was meant.

@scha14
Copy link
Contributor

scha14 commented Aug 15, 2020

@mraccess77 That is a really good question. This bullet of the success criteria covers persistence related to different types of focus (for example hover and keyboard focus) and what is expected when they overlap and interact with the same element that has additional text.

The scenario you describe is covered in the dismissable bullet, as outlined by the understanding document

The intent of this condition is to ensure that the additional content does not interfere with viewing or operating the page's original content. When magnified, the portion of the page visible in the viewport can be significantly reduced. Mouse users frequently move the pointer to pan the magnified viewport and display another portion of the screen. However, almost the entire portion of the page visible in this restricted viewport may trigger the additional content, making it difficult for a user to pan without re-triggering the content. A keyboard means of dismissing the additional content provides a workaround.

In this case, the focus should remain until the user dismisses it by a keyboard action, by pressing escape, or by panning and interacting with a section of the page where the additional content is no longer valid.

@scha14
Copy link
Contributor

scha14 commented Aug 27, 2020

@mraccess77 please comment if this is okay to close. Thank you!

@mraccess77
Copy link

I'm trying to understand the response - is the group agreeing that if it was focused with the keyboard that the additional content must remain when the mouse is moved around elsewhere? I can't tell from your response.

@scha14
Copy link
Contributor

scha14 commented Aug 29, 2020

@mraccess77 that would be correct. If the element was focused with the keyboard, and the mouse never interacted with the element with additional content, the additional content should still persist when the mouse is moved around.

@idoros
Copy link
Author

idoros commented Aug 29, 2020

Even when the mouse moves over the additional content and then moves out?

@scha14
Copy link
Contributor

scha14 commented Aug 31, 2020

@idoros if the content was triggered by keyboard, and later the mouse moved to it and then away - as long as the mouse doesn't trigger something new, the content should persist.

@idoros
Copy link
Author

idoros commented Aug 31, 2020

What is the definition of "something new"? I assume you mean another tooltip like content, but a page can contain many interactions that can be implemented in many ways and are impossible to detect.

Edit:

Also how about keeping it open, if a pop-up content is shown by the mouse and the gets a focus within, do you think the focus should keep it open when the mouse leaves?

@scha14
Copy link
Contributor

scha14 commented Oct 5, 2020

Draft response

@idoros content should persist in this case

@scha14
Copy link
Contributor

scha14 commented Oct 19, 2020

No change to SC or understanding document. Please reopen if anything remains unaddressed. Thank you!

@scha14 scha14 closed this as completed Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants