tags:

views:

48

answers:

2

We have the following snippet to get focus on a particular text field in a form onmouseover="this.focus();"

We have lots of text input fields throughout the user interface which expect some kind of input from the user. Is it a good practice to provide focus to the text fields onmouseover, assuming the target audience is not that computer savvy (e.g. children and adults who are first time computer users)

Is this a good practice, else users will have to click before they type something into the text field

+2  A: 

Computer applications does not usually focus a field when hovering over it. Children and other beginners would get confused if your application would do it in a different way. Click = focus is something general, do not try to diverge from that.

A better solution would add something like title="Click with your mousebutton if you want to enter something".

Lekensteyn
+2  A: 

Well, it really depends on the usability you want to offer your users. Aside from that, it will depend on what type of users you have.

I don't presume the focus on a hover is a particular good idea for the following reasons:

  • When the average user first sees a form, they will click the field they want to edit first (This comes by intuition because that's the way they usually are presented with forms.). After that, they will move the cursor away, so they can see what they are typing. In your scenario, this will cause the users to possibly change focus to another element.
  • Actually, the first item in this list contained a few reasons (It's not natural behavior and it might cause unwanted loss of focus)

The more advanced form-processes, so to say... Will usually start with the first field of a form, and then navigate it by keyboard with use of the tab-key.

I recommend you put your effort into making the flow of the form alright by navigating it with the tab key (HTML has a pretty good way of doing this, unless your code is all over the place and you have css putting them on their specific locations).

I would just leave the form as is, without mouse-over focusses. There's probably a good reason why focus on mouseover is not standard behavior ;)

Waltes
thanks for the excellent explanation
No problem :) If you want to check out natural behavior on applications, you might want to consider using the approach we at work would like to call a 'monkey-test'. Get somebody who is not particularly known with the application you're trying to make and only half knows what the flow of things is. This will help you figure out natural behavior for your application. It's still pretty much opinion based, but you can see what their intuition is. And it will also help you find bugs. The user might not do things as intended. You might want to seal off that too. Gladly helped
Waltes