Auto-Selecting a Form Field
Wednesday, June 22nd, 2005Here’s a pet peeve of mine: 9 times out of 10, when a web site automatically grabs the cursor’s focus and puts it on a form field in the page (usually a search or login field) it’s a mistake, and it makes me gnash my teeth.
Why? Well, from a purely philisophical standpoint, it’s never a good idea to take control of browser functions usually reserved for the user. It often causes confusion and resentment. From a practical standpoint, it messes me up.
Like a lot of people, I use a number of keyboard shortcuts and commands while I browse — the most frequent example being the use of the delete (or backspace) key instead of clicking the back button. When the focus is shifted to a text field, this stops working because the cursor has switched to “text edit” mode and is trying to delete some text in a field that I may not have even noticed.
This is annoying because my browser stops behaving as I expect, meaning:
- I have to figure out why;
- I have to correct or work around the problem.
While neither of these are significant challenges, they are an interruption of my train of thought; they derail my browsing experience and act as speed bumps.
Motivations
I’m guessing there are two main motivations for doing this:
- To save the user time;
- To call attention to a feature they (the site’s owner/developer) feel is important — a subtle “ahem.”
These motivations, while they may seem logical in theory, are problematic in practice.
The Road to Heck…
Motivation #1 makes an assumption that is likely to be false, e.g., that they can anticipate what my next use for the keyboard is going to be. They may expect me to use the search field, but more often than not I’m going to have other plans.
Even if they have correctly anticipated my next action, it’s still likely to be ineffective: I’m guessing that most web users (especially experienced web users) look with their eyes and the mouse at the same time, meaning that by the time my eyes have located the text field I’m looking for, the mouse pointer is right there with them. At the most, Motivation #1 has saved me a click, that’s assuming I notice the focus is already in the field, which isn’t a given. [In my opinion, only Safari, with its blue outline around active form fields, assists the user in any meaningful way in detecting active form fields.]
Motivation #2 is faulty because if I can’t tell what’s important just by looking at the page, they might want to re-think their IA and/or design a little. They’re just bypassing the shortcomings in their interface by taking over my browser.
Besides, is it really that important? When I’m browsing Lomography.com, is it really important that I log in? The placement and appearance of the login fields on the site don’t suggest any particular importance to me, or tell me what benefit there may be to logging in (plus, there’s a “remember me” checkbox, meaning that folks who want to stay logged in will be, and don’t need the feature).
Counterpoint
That having been said, there are times when automatically putting the focus on a field isn’t a bad thing. It just needs to be handled strategically.
Take this scenario: I click on a link that says “Log In.” I am brought to a page, in which the majority of the non-white space is taken up by the login form. In this case, it’s a very safe assumption that I want to use the form to log in. (The MyComicsPage.com sign in page is a good example of a page that could safely make this assumption.)
A good example everyone can relate to is Google’s home page. As soon as you get there it moves the focus to the most important element on the page, the search field. This, I’d be willing to bet, is another safe assumption.