SCRIPT with valid NOSCRIPT  
Section 508 1194.22(a); WAI / WCAG 1.0 checkpoint 1.1
 
 
Issue Description

SCRIPT element does not have an associated valid NOSCRIPT:

  • A NOSCRIPT should directly follow the SCRIPT element
  • The content of the NOSCRIPT element should not be empty. It can include any HTML instruction.

Note that the 508 standard does not require that all SCRIPTS be followed by corresponding NOSCRIPTS (though it is a suggested technique in WAI WCAG 1.0). The 508 standard requires that when pages use scripting languages to display content or to create interface elements, the information provided by the script should be identified with functional text that can be read by assistive technology.
There are two kinds of scripts that require special care and using the NOSCRIPT tag may help:

  • Rollovers: If a script changes an image on the screen when the user moves the cursor over the image, and the script does not indicate (through text readable by a screen reader) that it has changed the content of the page, the script cannot be made accessible.
  • Keyboard unoperable scripts: If the event triggering the script cannot be activated through the keyboard, then the script cannot be made accessible
 
 
How to check

Check that the information provided by the script can be also provided by text that can be read by assistive technology.

The easiest way to check if a script is accessible is to try to view the page with a browser where scripts and image loading are temporarily disabled (consult the browser's documentation to learn how to disable scripts and image loading).
Another approach is to use the page without the mouse (by tabbing through elements and using only the keyboard). This gives you an idea of the role actual played by the script in the interaction.

If not, consider adding a NOSCRIPT element to the SCRIPT. It can contain any HTML tag. Its content should let people that do not execute the script achieve the same effects as those that do. In particular, they should be able to access the same content and same interaction opportunities, including links.

 
 
Issue Explanation

One way to provide a text equivalent to a SCRIPT element is with NOSCRIPT. The content of this element is rendered when scripts are not enabled.

The NOSCRIPT element allows authors to provide alternate content when a script is not executed. The content of a NOSCRIPT element should only be rendered by a script-aware user agent in the following cases:

  • The browser is configured not to evaluate scripts
  • The browser doesn't support a scripting language invoked by the script

Users of screen readers and speaking browsers would not be able to take advantage of scripts that affect the graphical interface of a web page.

Users not using a mouse or joystick would not be able to take advantage of scripts that open windows, dialogs, or menus.

Note that there are many other cases where scripts cannot be run by browsers, and there are going to be more and more of these cases in the future. They include:

  • PDAs and cellular phones unable to execute scripts
  • Browsers in diverse operating systems (Windows, MacOS, Linux) unable to execute scripts written in a given language. For example, VBScripts will not run in Netscape on Linux machines or PDAs
  • Users of graphical browsers who disable Javascript for security reasons