E-mail List Archives

Re: double click without mouse on web page

for

From: Jukka K. Korpela
Date: Dec 20, 2012 3:15PM


2012-12-20 21:39, Angela French wrote:

> Here is the context in the web app. The user types into a text field
> and clicks an "Add" button at the right end of the text field. The
> text that they entered is then displayed in the next form field on
> the page. This can be done multiple times, thus building a "list" in
> the second form field. If the user wants to remove an item from the
> list, they select it and double-click to make it "disappear" from the
> text box (list).

There are two basic aspects here.

A browser, or a browser engine used to run an application, should
provide methods for producing events like double click using keyboard
only. This is expressed in user agent accessibility guidelines, but I'm
afraid browsers haven't made much progress in this area.

Thus, another aspect becomes relevant. If you use a double click event
handler, you should also have a suitable event handler with the same
processing for keyboard events. At the very simplest, you would have
both an ondblclick handler and an onkeypress handler. It is difficult to
say, though, what the keyboard event should really be. You could require
that a specific key be used, like the "R" key for remove. But you cannot
even know whether the keyboard has such a key; the user might be using a
Greek keyboard with no keys for Latin letters.

Yucca