Google Toolbar Part III

January 23, 2004

Google Toolbar Part III

Whenever I forget to tell myself to KISS, I can always count on others to help me out ;)

Paul Burdon sent me an email yesterday outlining a much more elegant (and simple) solution to the yellow form fields dilemna caused by the Google Toolbar.

He pointed out that if you use an "!important" declaration, you can ensure that your form fields keep the background color specified. Well, I feel kind of silly. Given that AutoFill applies the yellow by modifying the style property of an element, it goes without saying that stylesheet declarations denoted as !important would take precedence. I guess I just overlooked the obvious.

I would still recommend using this particular version of the JavaScript solution for accessibility reasons. It lets you implement the following:

  1. Instead of unstyling all AutoFill elements, you style them to your liking but visibly different from other elements.
  2. Create a note that only AutoFill users can see that explains that AutoFill can be used on this form.

The advantages are threefold:

  1. You maintain control over your design—no unsightly form fields.
  2. You don't thwart your users—those that enjoy the functionality of AutoFill.
  3. The note educates those users who otherwise wouldn't know what AutoFill does.
Posted by jon at January 23, 2004 11:58 PM