Auto-Selecting a Form Field

Here’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:

  1. To save the user time;
  2. 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.

Lomography ScreenshotBesides, 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.)

Google ScreenshotA 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.

2 Responses to “Auto-Selecting a Form Field”

  1. Jim Says:

    “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.”

    Not at all a safe assumption. I use Google as a home page. Not for the search, but because it pulls in various news and information and rss feeds, plus all those fun little add-on toys. What drives me bonkers, and is likely to make me change my home page strategy, is that it forces the focus to the search. Worse, it does this AFTER I have clicked in the address bar to type a website address, so that I end up with “http://www.tee” in the address bar and “sed.com” in the search field.

    I would love to find something, perhaps a Firefox extension, that turns off autofocus.

  2. Velogymnosophist Says:

    “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.”

    Sure enough. But in the case of Google, how many of us still actually GO to Google’s homepage to search?

    The biggest problem I used to have on Yahoo! Mail back in my dark ages of dial-up (hey, some still use it today) was after tabbing to username field, entering username, and tabbing to password field, halfway through typing my password, the page would finish loading and grab focus back to username. Ctrl-z (ah that was also in my dark ages of MS product usage) saved the username, but unfortunately I always had to re-type the entire password.

    Annoyingly frustrating indeed.

    I used to send emails to support, but nobody listened. They all though I had a problem with cookies or something. HA!