[Techs-scripting]FW: setting focus on a form field using javascript

I'm forwarding this toA thread on the WAI-IG list relevant to discussion
of scripting techniques.

John


"Good design is accessible design." 
John Slatin, Ph.D.
Director, Accessibility Institute
University of Texas at Austin
FAC 248C
1 University Station G9600
Austin, TX 78712
ph 512-495-4288, f 512-495-4524
email jslatin@mail.utexas.edu
web http://www.utexas.edu/research/accessibility/


 



-----Original Message-----
From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org] On
Behalf Of Patrick Lauke
Sent: Friday, May 06, 2005 4:37 am
To: w3c-wai-ig@w3.org
Subject: RE: setting focus on a form field using javascript



> 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
________________________________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk

Received on Friday, 6 May 2005 13:22:34 UTC