W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > October to December 2005

Re: Noscript equivalent for clearing default text input values

From: David Dorward <david@us-lot.org>
Date: Wed, 7 Dec 2005 15:16:34 +0000
To: w3c-wai-ig@w3.org
Message-ID: <20051207151634.GE14610@us-lot.org>

On Wed, Dec 07, 2005 at 02:57:42PM -0000, Julian Scarlett wrote:

> Can anyone advise on a suitable <noscript> for a bit of inline
> javascript that clears default text input values onfocus and puts
> them back onblur? [When I say it's inline I mean it's placed inside
> the <input> element.]

<noscript>

  <p>We've put some text in these inputs by default. We recognise that
  as default values they leave rather a lot to be desired, so we have
  some JavaScript to remove the text when the user gets to a point
  where they want to put their own text in it. This is bound to
  confuse some users who have JavaScript enabled. You, on the other
  hand, don't have JavaScript enabled, so you have to remove the text
  manually (which is what you would do anyway). We just felt the need
  to gloat over your lack of scripting support and point out what you
  are missing.</p>

</noscript>

... I'm having a bit of a bad day, so that might have come out overly
sarcastic.

Seriously: good JavaScript will enhance the user experience but
degrade gracefully if support isn't present. Times when <noscript> is
a good idea are very rare indeed. If you go ahead with this default
text, then just leave it to be manually deleted by the user, or _set_
it with JavaScript in the first place. 

I suspect though, that the default text is redundant or is trying to
make up for an inadequate <label>, and that you should backtrack and
fix the real problem.

-- 
David Dorward                                      http://dorward.me.uk
Received on Wednesday, 7 December 2005 15:17:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:23 GMT