Double tap delay

Even though my encounter with Tess yesterday was brief, we still managed to turn the conversation to browsers, standards, and all things web in our brief chat.

Specifically, we talked about this proposal in Blink related to the 300 millisecond delay that mobile browsers introduce after a tap event.

Why do browsers have this 300 millisecond delay? Well, you know when you’re looking at fixed-width desktop-based website on a mobile phone, and everything is zoomed out, and one of the ways that you can zoom in to a specific portion of the page is to double tap on that content? A double tap is defined as two taps less than 300 milliseconds apart. So whenever you tap on something in a touch-based browser, it needs to wait for that length of time to see if you’re going to turn that single tap into a double tap.

The overall effect is that tap actions feel a little bit laggy on the web compared to native apps. You can fix this by using the fastclick code from FT Labs, but I always feel weird solving a problem on mobile by throwing more front-end code at it.

Hence the Blink proposal: if the author has used a meta viewport declaration to set width=device-width (effectively saying “hey, I know what I’m doing: this content doesn’t need to be zoomed”), then the 300 millisecond delay could be removed from tap events. Note: this only affects double taps—pinch zoom is unaffected.

This sounds like a sensible idea to me, but Tess says that she sometimes still likes to double tap to zoom even in responsive designs. She’d prefer a per-element solution rather than a per-document meta element. An attribute? Or maybe a CSS declaration similar to pointer events?

I thought for a minute, and then I spitballed this idea: what if the 300 millisecond delay only applied to non-focusable elements?

After all, the tap delay is only noticeable when you’re trying to tap on a focusable element: links, buttons, form fields. Double tapping tends to happen on text content: divs, paragraphs, sections. That’s assuming you are actually using buttons and links for buttons and links—not spans or divs a-la Google.

And if the author decides they want to remove the tap delay on a non-focusable element, they can always make it focusable by adding tabindex=-1 (if that still works …does that still work? I don’t even know any more).

Anyway, that was my not-very-considered idea, but on first pass, it doesn’t strike me as being obviously stupid or crazy.

So, how about it, browser makers? Does removing the 300 millisecond delay on focusable elements—possibly in combination with the meta viewport declaration—make sense?

Have you published a response to this? :


Shane Hudson

@adactio I like that idea a lot. The only edge case I can quickly imagine is for large links (eg. a clickable picture).

Rob Lifford

@adactio Yeah, that made perfect sense when I first read it, and it still does. Did you ever get any response from browser vendors’ devs?

# Posted by Rob Lifford on Monday, October 19th, 2015 at 10:28am

Oliver Pattison

@adactio This is a solid idea – I linked to it a few days ago in a debate about viewport. Encourages rather than discourages accessibility.


# Shared by JimDabell on Monday, October 19th, 2015 at 10:35am

# Shared by Anthony Mellor on Monday, October 19th, 2015 at 11:33am

# Shared by Baldur Bjarnason on Monday, October 19th, 2015 at 12:03pm

# Shared by James Bell on Monday, October 19th, 2015 at 1:05pm

# Shared by Elaine Nelson on Monday, October 19th, 2015 at 3:33pm


# Liked by Trent Walton on Monday, October 19th, 2015 at 1:10pm

# Liked by Baldur Bjarnason on Monday, October 19th, 2015 at 1:11pm

# Liked by Oliver Pattison on Monday, October 19th, 2015 at 1:33pm

# Liked by Dennis Kerzig on Monday, October 19th, 2015 at 3:09pm

# Liked by Neil Creagh on Monday, October 19th, 2015 at 11:52pm

Previously on this day

9 years ago I wrote Your own words

Reclaim what you publish: come along to IndieWebCamp in Brighton on September 9th.

10 years ago I wrote Impostor syndrome

An overwhelming number of upcoming events.