E-mail List Archives

Re: defining focus


From: Jared Smith
Date: Mar 12, 2003 2:26PM


My opinion would be to be very careful with its use, as users
anticipate the focus to begin at the top of the document. You would
probably never want to change focus at any time except when the page
is loaded. However, on sites like http://www.google.com/, where the
focus is initially set to the search text field, I would think that
this might be a good practice. Any user constrained to using the
keyboard, including screen reader users, would probably find this
useful, because they don't have to tab through the several navigation
items just to type in a search term. I personally like the feature, as
it saves me a mouse click or 5 presses of the TAB key. This approach,
though, might be slightly confusing to someone first coming to the
site, but I don't think it limits the accessibility of the page.
Still, a search engine or perhaps a chat program are about the only
cases where I could personally think setting the focus could be

You would definitely want to avoid changing focus based on some user
event, such as onMouseOver or onFocus.

Jared Smith
WebAIM (Web Accessibility In Mind)
Center for Persons with Disabilities
Utah State University

On Wednesday, March 12, 2003 you sent:
DF> I hope I'm not prematurely asking the list about this.

DF> Are there any particular issues with setting focus onto a form field with
DF> Javascript? It feels like an undesiable practice to me just by its very
DF> nature, but I'd like to hear your thoughts as well. If you know of any
DF> documentation explaing either pro on con, that'd be a great help as well.

DF> Thanks in advance for your time.

DF> Dave Ferrick

DF> ----
DF> To subscribe, unsubscribe, or view list archives,
DF> visit http://www.webaim.org/discussion/


To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/