WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Placeholder text in forms for Priority 3


From: Jared Smith
Date: Aug 8, 2008 10:00AM

On Fri, Aug 8, 2008 at 9:48 AM, Dan Conley < <EMAIL REMOVED> > wrote:
> That's how I have it now: an onFocus to clear the text. I suppose it's
> more of a consistency issue, really, since my newer forms are blank.

A better approach is to use scripting to set the value of the text box
on page load and remove the text onfocus. This removes the issues
documented above if the user has scripting disabled.

With this said, it should be readily apparent what a form element does
from it's label and/or the button that activates that form. The
inclusion of default text often indicates a form is not very user
friendly to begin with.

Jared Smith