Related Entries

Processing e-mail attachments properly
The Cranky User
Building accessible tables
Inaccessible accessibility
Day 10 gets me stumped!

« Software installation with Ant
» Making spam go splat

Don't set automatic focus!

Setting auto focus on a text box can frustrate users using page-up/dn keys.

Several sites try to enhance their sites usability by writing a simple Javascript to automatically focus on to the first form field. Typically, lot of sites have the first field as the "Search" box. For long scrolling pages (example), such focussing is more annoying than helpful. Since the focus gets into the form field, whatever you do with "Page-UP" or "Page-DOWN" buttons and arrow keys have no effect.

If your page is specifically for a web form, then this kind of automatic focussing makes sense. Even then, if your first field is a select list don’t put auto-focus on it. People might try to scroll down, but what will happen is that some thing else in the select list will get selected, without user noticing it.

//-->