[thelist] Incorporating a NOSCRIPT declaration where the script is in the header

Web Designers evolt.list at gmail.com
Wed Jan 25 14:23:56 CST 2006


I'm putting together a site  with a style switcher based upon the A
List  Apart one.

In the head section, I have this:

<script type="text/javascript" src="includes/styleswitcher.js"></script>
<link rel="stylesheet" type="text/css" href="includes/style.css"
title="default">
<link rel="alternate stylesheet" type="text/css"
href="highcontrast.css" title="highcontrast">
<link rel="alternate stylesheet" type="text/css"
href="highvisibility.css" title="highvisibility">

Then  in the body I have the links:

<a accesskey="2" class="default" title="Change the style of this page
to the default" href="javascript:setActiveStyleSheet('default')"
target="_self">normal</a> ||
<a accesskey="3" class="highcontrast" title="Change the style of this
page to higher contrast"
href="javascript:setActiveStyleSheet('highcontrast')"
target="_self">high contrast</a> ||
<a accesskey="4" class="highvisibility" title="Change the style of
this page to larger fonts"
href="javascript:setActiveStyleSheet('highvisibility')"
target="_self">high visibility</a>

This work really nicely. Unless the browser has Javascript disabled. 
No real problem there, but when I check for AAA or 508 compliance, I'm
told:

"Rule: 6.3.4 - When SCRIPT Elements are used, the NOSCRIPT element  is
required in the document.
Warning - SCRIPT Element(s) are found in  document and the NOSCRIPT
element is not."

Ideally, I'd like  to add the noscript element in place of or
underneath the stylesheet switcher,  but I can't work out how to
accomplish this - I'm having a "Senior  Moment"...

Any ideas?

--
Richard Morris



More information about the thelist mailing list