web Accessibility

Scripts - Checkpoint (l)

The law states:

"When web pages utilize scripting languages to display content, or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology."

You should generally stay away from using scripts (most notably JavaScript) to generate content (especially navigation such as fly-out menus). If you decide to do so, the content generated by the scripting should be accessible with or without JavaScript turned on, unless the content is purely decorative. The content must be available to both mouse and keyboard users. A good way to test this is to turn off JavaScripting to see if JavaScripted features of your web site are still accessible and presents all equivalent important information.

Best practice is to use unobtrusive JavaScript. Unobtrusive JavaScript allows the content to still be available and gives the user an equivalent experience of the page when JavaScript is turned off. This coding technique does not require the <noscript> element.

Obtrusive JavaScript hides or prevents the viewing of equivalent content should JavaScript be turned off. This older coding technique would require the <noscript> element.

The Cal Poly Site with Scripting Turned Off

If you turn off scripting on the Cal Poly web site, two features do not work. Neither of these features is obtrusive in that they don't deny equivalent content. The pictures of Poly Reps in various areas of Cal Poly no longer change each time you open the Web page. The quick links menu also does not work, but the links in the menu can be followed through other means.

Screenshot of Calpoly web site with scripting turned off.

Things to Avoid

You should also never use JavaScript to automatically direct users to a Web site. Web site designers typically use this technique with jump menus (pull-down lists containing quick links). Keyboard users (which includes screen readers) are automatically taken to a Web site without any action on their part, which leaves them confused about what just happened. To fix this, you should always provide a button (most commonly labeled "Go") for users to click on to go to a web site selected from a pull-down menu.

Information is AvailableHelpful Web Sites