little things
I like to do a couple of things to make a web app a little more usable. The first is to put some thought into the tabindex attribute. I am a tabber when it comes to navigating a form and I love it when the author took the time to make sure I can tab through the fields in a logical sequence. I really hate it when I think I am going to tab to the submit button but instead tab to the “Forgot Password” link…I also have an itchy enter pinky and I usually end up hitting tab->enter too fast to realize the tab took me to the link.
example:
<input type="text" name="firstField" tabindex="1"/>
<input type="text" name="secondField" tabindex="2"/>
<input type="submit" value="Submit" tabindex="3" />
<a href="forgotPasswd.html" tabindex="4">Forgot your password?</a>
The second thing I like to do is to put a little JavaScript in there to bring focus to the first field.
example:
function placeCursor() {
if ( document.NameOfForm ) {
document.NameOfForm.firstField.focus();
}
}
I usually put it in the if block so I can just throw it in the JS lib that I import on every page. You can do that without the if block, but then you’ll see an error in the JS Console on other pages (I don’t like that).
Anyhow, I realize these are mundane things and you may already do them. If so skip this post :)
I also like the the author of a web app has taken the time to have fields with multiple input boxes (like area code + phone or SSN) autotab. Actually, it’d be better if I could just enter my phone number or SSN all in one box each.
Good point. That is excellent. Not so much for me in web apps, but in a GUI app, like a game that makes you enter the serial number, that is a must have. It’s already a pain to type in some random string.
The advice, I read somewhere, that I like to apply to my code is “Don’t mistreat the user”. And not doing the little things is (in my book) mistreating the user.
One of my pet peeves are forms that ask for your address, and then force you to use a drop down list select your state. This means that autofill features don’t work, plus it is a heck of a lot more difficult to get to NY, for instance, that typing two letters.