Re: Touch Events / Remapping?

On 03/02/2016 15:29, Alistair Garrison wrote:
> Dear All,
>
> I've been dealing with an issue related to touch events being remapped -
> leaving functionality unable to be used by AT users.

Any details about the specific issue?

> I looked at
> https://github.com/w3c/Mobile-A11y-TF-Note/blob/gh-pages/Techniques/M027.html.
>
>
> I was wondering if anyone had any concrete examples of using mouse and
> keyboard events to support touch events (but preventing double firing
> etc…).  Or, are there downsides to this?

In general, if it's just a case of something that reacts to a "tap", 
authors should simply use "click" (on a focusable element) rather than 
any touch events altogether.

There has been a practice of listening for touchstart rather than click 
to bust the 300ms delay present on most mobile browsers, but this 
practice is becoming less necessary as most browsers optimise this delay 
away for sites with a mobile (width=device-width) viewport. See 
http://patrickhlauke.github.io/touch/tests/results/#suppressing-300ms-delay

If you ARE in a situation where you need to listen to both touch events 
and mouse/keyboard interaction, you'd generally want to cancel the event 
on touchstart to prevent the browser from firing compatibility mouse 
events and click. See slide 82 
http://patrickhlauke.github.io/getting-touchy-presentation/#82

P
-- 
Patrick H. Lauke

www.splintered.co.uk | https://github.com/patrickhlauke
http://flickr.com/photos/redux/ | http://redux.deviantart.com
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 3 February 2016 16:25:38 UTC