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

Vclick event not triggered reliably on links when Mobile VoiceOver is enabled #8271

Closed
btippett opened this Issue Aug 26, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@btippett
Contributor

btippett commented Aug 26, 2015

When using Mobile Safari with the Mobile VoiceOver accessibility tool enabled the vclick event is not triggered reliably on links. One would expect the vclick event to be triggered when double tapping a clickable element. On button elements this is the current outcome. However on links a vclick event is not triggered when the user double taps. It may later be triggered when a user double taps on another clickable element, see the findings below.

Steps to Reproduce

  • Use an iOS device with Mobile VoiceOver turned on
  • Open the test page in Mobile Safari
  • Debug the test page in Safari
  • Observe the console output
  • Note: the test page must not be viewed in an iframe for accurate console output, hence the link to the output only in the steps above

Test Environment

Device: Apple iPad Air
OS: iOS version 8.3
Browser: Mobile Safari with Mobile VoiceOver enabled
jQuery: v1.11.1 and v2.1.4
jQuery Mobile: 1.5.0-pre

Findings

  • When double tapping a button element, which exhibits the expected behavior, the dispatched events are as follows: touchstart > touchend > vclick > click
  • When double tapping a link, which exhibits unexpected behavior, the dispatched events are as follows: touchstart > click
  • The vclick event is not dispatched. Because the link has an associated touchID from the touchstart event the browser's click event is ignored. The vclick event is not dispatched until a touchend event is triggered on the link.
  • A touchend event may be received on the link at a later time which will then trigger a vclick event.
  • If the user moves virtual focus to another link and double taps it a touchmove event will be triggered on the original link. This will not result in a vclick event being triggered.
  • If the user moves virtual focus to a button and double taps the button a touchend event will be triggered on the original link. This causes a vclick event to be triggered on the original link.
  • If the same tests are run without jQuery and/or jQuery Mobile the native event behavior is the same. In other words, the observed behavior of the native events when Mobile VoiceOver is enabled is not being altered by jQuery or jQuery Mobile.
@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Aug 26, 2015

Member

If the same tests are run without jQuery and/or jQuery Mobile the native event behavior is the same. In other words, the observed behavior of the native events when Mobile VoiceOver is enabled is not being altered by jQuery or jQuery Mobile.

@btippett This makes this sound like not a bug if the behavior is the same either way. Also i believe the behavior your describing is the intended behavior in iOS. What you are describing is the double tap to zoom feature in iOS.

Member

arschmitz commented Aug 26, 2015

If the same tests are run without jQuery and/or jQuery Mobile the native event behavior is the same. In other words, the observed behavior of the native events when Mobile VoiceOver is enabled is not being altered by jQuery or jQuery Mobile.

@btippett This makes this sound like not a bug if the behavior is the same either way. Also i believe the behavior your describing is the intended behavior in iOS. What you are describing is the double tap to zoom feature in iOS.

@btippett

This comment has been minimized.

Show comment
Hide comment
@btippett

btippett Aug 26, 2015

Contributor

Sure, if VoiceOver were turned off double tap would be the gesture the user uses to zoom. But this issue is only applicable when VoiceOver is turned on. I.e. it's only an issue for users using assistive technology (Mobile VoiceOver) on their iOS device. Having VoiceOver enabled changes the gestures the user uses to navigate in the browser. (E.g. swipe left/right moves the virtual focus, double tap "clicks" an element, etc.)

My comment about the native event behavior being the same whether jQuery or jQuery Mobile is present is important because it indicates that while I, and many others I expect, may think it is pretty odd that buttons and links get different touch/click events with VoiceOver enabled it is behaving as Apple designed it to and is not being influenced in any way by something unique to jQuery or jQuery Mobile.

I do think you could make the case that the event triggering is "wrong" and should be fixed by Apple but that doesn't help assistive technology users using sites with jQuery Mobile today.

Contributor

btippett commented Aug 26, 2015

Sure, if VoiceOver were turned off double tap would be the gesture the user uses to zoom. But this issue is only applicable when VoiceOver is turned on. I.e. it's only an issue for users using assistive technology (Mobile VoiceOver) on their iOS device. Having VoiceOver enabled changes the gestures the user uses to navigate in the browser. (E.g. swipe left/right moves the virtual focus, double tap "clicks" an element, etc.)

My comment about the native event behavior being the same whether jQuery or jQuery Mobile is present is important because it indicates that while I, and many others I expect, may think it is pretty odd that buttons and links get different touch/click events with VoiceOver enabled it is behaving as Apple designed it to and is not being influenced in any way by something unique to jQuery or jQuery Mobile.

I do think you could make the case that the event triggering is "wrong" and should be fixed by Apple but that doesn't help assistive technology users using sites with jQuery Mobile today.

btippett added a commit to btippett/jquery-mobile that referenced this issue Aug 28, 2015

Events: Fix inconsistent vclick behavior with Mobile VoiceOver enabled
In cases where a click event is received after a touchstart event, but prior to
receiving any other touch events, wait a set duration and if no further touch
events have been received re-enable mouse bindings and call the mouse event
click handler again on the click event. This prevents vclick events from firing
at unexpected times on Mobile Safari with VoiceOver enabled when the user double
taps a link element to activate it.

Fixes gh-8271
@btippett

This comment has been minimized.

Show comment
Hide comment
@btippett

btippett Aug 28, 2015

Contributor

One of my colleagues has logged an issue with Apple in regards to the unexpected firing of touch events on links.

Issue ID: 22459654
Title: iOS VoiceOver does not fire touchend events on links as expected

Apple does not offer public updates on the issue but they may respond directly to him.

Contributor

btippett commented Aug 28, 2015

One of my colleagues has logged an issue with Apple in regards to the unexpected firing of touch events on links.

Issue ID: 22459654
Title: iOS VoiceOver does not fire touchend events on links as expected

Apple does not offer public updates on the issue but they may respond directly to him.

arschmitz added a commit that referenced this issue Mar 26, 2016

Events: Fix inconsistent vclick behavior with Mobile VoiceOver enabled
In cases where a click event is received after a touchstart event, but prior to
receiving any other touch events, wait a set duration and if no further touch
events have been received re-enable mouse bindings and call the mouse event
click handler again on the click event. This prevents vclick events from firing
at unexpected times on Mobile Safari with VoiceOver enabled when the user double
taps a link element to activate it.

Fixes gh-8271
@apsdehal

This comment has been minimized.

Show comment
Hide comment
@apsdehal

apsdehal Jun 15, 2016

Member

Closing as fixed and landed in 1.5-dev.

Member

apsdehal commented Jun 15, 2016

Closing as fixed and landed in 1.5-dev.

@apsdehal apsdehal closed this Jun 15, 2016

arschmitz added a commit to arschmitz/jquery-mobile that referenced this issue Jul 4, 2016

Events: Fix inconsistent vclick behavior with Mobile VoiceOver enabled
In cases where a click event is received after a touchstart event, but prior to
receiving any other touch events, wait a set duration and if no further touch
events have been received re-enable mouse bindings and call the mouse event
click handler again on the click event. This prevents vclick events from firing
at unexpected times on Mobile Safari with VoiceOver enabled when the user double
taps a link element to activate it.

Fixes gh-8271

@apsdehal apsdehal self-assigned this Aug 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment