W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2005

RE: setting focus on a form field using javascript

From: Patrick Lauke <P.H.Lauke@salford.ac.uk>
Date: Fri, 6 May 2005 10:37:02 +0100
Message-ID: <3A1D23A330416E4FADC5B6C08CC252B9FD6CB3@misnts16.mis.salford.ac.uk>
To: <w3c-wai-ig@w3.org>

> David Dorward

> This can work if there is only one field. If there are more fields,
> then it is quite possible for the user to click on the field and start
> entering data before the JavaScript fires.
> This isn't hypothetical, its happened to be one more then one
> occasion, and I've found it very frustrating.

Definitely. I get equally annoyed when I do a type-ahead search in Firefox
(I have it set so that I just need to type to start the search, without having
to CTRL+F first) when I get to a page and halfway through my typing the focus
is yanked away from under my feet and the last two or three letters of my
search end up in the input field. I know, a very specific situation, but a real
one nonetheless.

You could argue that if input itself is the main focus of the page (e.g. Google),
then it's acceptable...although you could just ensure that the markup is such
that the input comes first (or at least very early on) so even just tabbing to
it would take a minimal, negligible amount of time and effort.

Patrick H. Lauke
Webmaster / University of Salford
Received on Friday, 6 May 2005 09:36:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:25 UTC