Skip to main content

Non-Essential scripts

Web checkpoint 5




There are two types of non-essential scripts: those that simply enhance the visual presentation but do not communicate any additional information and those that provide an alternative way of performing function on the page. No additional accessibility techniques are required for non-essential scripts.

For example, onMouseOver is often used to highlight the item by changing the background color. It is also often used to produce purely decorative effects such as highlighting an image or changing the color of an element's text. Scripts of this type do not affect accessibility and do not require additional techniques.

Figure 1 illustrates an example of a script that provides and alternative way of performing function on a page. This shopping site provides a pair of graphical arrows pointing up and down, that when selected, increase or decrease the desired quantity of the item in the shopping cart. The JavaScript is actually associated with a small image map and the appropriate alternative text representing the function of selecting the map area. Since the quantity desired can also be entered directly into the "Qty" field just as easily with the keyboard without clicking the JavaScript arrow functions, this would be considered non-essential scripting. Since there is an alternative (without using noscript) way of accomplishing the essential task of entering the quantity, the script would not need to be made directly accessible:

image of shopping cart example

...
<map name=uptown3407>
<area cords=0,0,10,9 href="JavaScript:quantity(3407)" alt="add one..." />
<area cords=0,11,10,20 href="JavaScript:(3407)" alt="decrease" />
</map>
...

Technique summary for non-essential scripts
Required: Recommended:
None Required Use noscript element.


©2001, 2008 IBM Corporation

Last updated February 28, 2008.