W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2006

Re: Reasons for not using <noscript> (was: Google Adsense ... not accessible)

From: David Dorward <david@us-lot.org>
Date: Mon, 30 Jan 2006 22:17:41 +0000
To: w3c-wai-ig@w3.org
Message-Id: <1138659462.7555.18.camel@cyberman.dorward.me.uk>

On Mon, 2006-01-30 at 22:00 +0000, David Woolley wrote:

> Jim was suggesting that <noscript> actually implies poor programming.
> I'd disagree, in part because it is quite likely to be be put in by an
> accessibility aware programmer when the client is insisting that the page
> should do things that rely on "Javascript" processing.

Poor programming because a client insists on doing it that way is still
poor programming. 

> This relies on the no-scripting case being a don't care condition for the 
> client so, whilst the programmer has exceeded their brief, with possible 
> cost implications, the client will probably never know that the fallback exists.

The fallback should, and I suspect this was Jim's point, be *graceful*. 

<noscript> assumes that there are only two possible outcomes, scripting
is unsupported, or the script will work. It can't take script failure
into account.

For example:

<script type="text/javascript">
doSomethingWith(document.getElementById('foo');
</script>
<noscript>
Something equivalent to doSomethingWith()
<noscript>

Netscape 4.x supports JavaScript. Assuming it is turned on, it will no
process the <noscript> element. However, it does not support
document.getElementById, so it will fail to process the <script>.

Other examples might work only in MSIE, or in browsers which support DOM 2.

-- 
David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy
Received on Monday, 30 January 2006 22:19:24 GMT

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