|
|
|
|
|
Whenever a script or applet is used to produce some effect on a Web document, an alternative method of conveying the same information must also be provided. This alternative will likely be comprised of standard HTML, text and images that can be accessed by a wide range of browsers. Web designers must carefully consider how to create these alternatives so they communicate the same message as the script or applet. Though an accessible alternative may not be as flashy as the original, it is essential to include it. Otherwise, many users may encounter nothing but a blank page if a script or applet does not work on their browsers. It is a simple matter to provide an alternative to a JavaScript routine by including a pair of "noscript" tags immediately after the JavaScript code. In most cases, the JavaScript routine will be executed by the user's browser and the noscript alternative will be ignored. But for the minority of visitors whose browsers do not recognize JavaScript, the HTML code contained between the noscript tags will be rendered instead.
<script language = "JavaScript" type = "text/JavaScript">
Content conveyed using JavaScript
</script>
<noscript>
Same content conveyed without JavaScript
</noscript>
For the most part, Access Art avoids new technologies that might
present accessibility barriers to users. However, the EyeSpy™
image enlargement system described on the
Keyboard Access page
does utilize JavaScript. In order to ensure that this feature works
even in browsers that do not support JavaScript, a script-free
alternative is provided. The lines of JavaScript code shown below
activate the EyeSpy™ viewer.
<script language = "JavaScript" type = "text/JavaScript">
eyespyviewer();
</script>
Immediately afterward, a noscript tag provides an accessible
alternative for visitors whose browsers do not support JavaScript.
In this simplified example, an ordinary image is displayed, along with
a link that leads to a separate page where visitors can use the image
enlargement system without JavaScript.
<noscript>
<img src = "filename" alt = "description">
<a href = "pagename">Image Enlargement</a>
</noscript>