There are typically only two types of forms that tend to get squeezed into tight quarters in page layouts: login, and search. For this reason, web designers are often tempted to save space by hiding the labels on these forms and assuming that a user will intuitively know what to type into each textbox. With a simple search form, this is logical because you have a textbox next to a button that says “Search”, “Go”, or perhaps “I’m feeling Lucky”. Login forms are a little trickier. For most of us, seeing two text boxes and a “login” button is all we need to play McGyver, but the average user often needs those “Username:” and “Password:” labels to know what to enter.
A common solution to this problem is to use javascript to show and hide “hints”. This is one of those tasks that has a dozen different (perfectly acceptable) methods, and everyone tends to stand behind their choice as boldly as they do their favorite presidential candidate. I’ve tried a few of these methods, but because I tend to do it a bit differently, I thought I’d share.
Most of the solutions out there either insert a value into the textbox or they move around a label. Inserting a value into a textbox is the most obvious/common solution and has its pros and cons, but the deal breaker is the fact that a value inserted into a password box will still display as dots/asterisks. As far as I know, you can’t dynamically change the type of an input from password to text, so that solution is out. Moving around a label tag is something I first read about on the ALA article: Making Compact Forms More Accessible. It’s an ingenious idea really, but:
With those things in mind, I decided to try using a background image for on the textbox instead of the label. Also, I tend to incorporate jQuery into most projects lately, so it made sense for me to write it in that - although it could just as easily be rewritten as straight Javascript if necessary.
I believe it was Dustin Diaz who first introduced me to the Boagworld podcast back in early 2006. Since then, I’ve been enjoying the intelligent, witty, and entertaining banter between Paul Boag and his co-host Marcus Lillington about all things related to website design and development. Needless to say I was extremely excited when Paul invited me to talk about web design basics and “pimp my book” for the latest episode:
“107. Running to keep up”.
After listening to part of the show, Ames jokingly said “You sound so serious.” Despite my austere demeanor, I had a great time geeking up the air waves with my thoughts on layout, color, texture, typography, and imagery. The entire interview was really just a quick rundown of the key points in each chapter of the book, but it gave me an opportunity to bring up some resources and trends that have developed since the book came out.
Toward the end of the interview, Paul said
The Principles of Beautiful Web Design is:
…a perfect book for a lot people that listen to this show if you are starting out in any form of design and don’t come from a design background.
I’m always happy to hear positive feedback like that about the book, especially from people like Paul who do so much to keep the masses up to date on the latest resources and trends in the industry.
Be sure to check out the show.
I’m usually pretty bad at making long term goals and even worse at keeping up with my own accomplishments. After seeing similar posts from D. Keith, Snook, and Steve, I decided that keeping track of these milestones and resolutions via my blog is a practical way to keep them alive. So here it is, my 2007 highlights and 2008 goals. Better late then never, huh?
In no particular order…