Tutorials from WAC. Click or press ALT+T to return to the Tutorials main page.

Accessible Design: Best Practices

Return to Tutorial Contents


divider


Scripts and Plug-ins

Using Scripts.


M.W.A.S. Logo

12)When pages utilize scripting languages to display content, or to creat interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology. (M.W.A.S. 12)

Because there are so many types of scripts and scripting techniques available to web designers, this standard focuses on the result or output rather than the method or specific script function. Basically, the standard says that no matter how scripting is use -- server-side or client-side; ASP, .Net, PHP, or ColdFusion -- the end result that is interpreted by the browser must be accessible to users of assistive technology.

Client-side versus Server-side Scripting

In most cases, server-side scripting is the more accessible choice. Server-side scripting involves sending a particular set of data or function call to the web server, which processes the request, and returns the result to the browser. Because all of the processing is done on the server-side, the user does not need any special configuration to take advantage of the script. And, as long as the result is returned by the server in a form easily interpreted by a browser (such as in HTML), then the user will not be impacted in any way.

Client-side scripting, on the other hand, relies on built-in tools from the user's browser to complete the requested processes. Although these are typically well-supported (like the ability for most browsers to process JavaScript), they are not universally supported. In particular, assistive technology software is most likely unable to support client-side scripting, because of the other client-side functions that must occur to re-render the display in the particular format required by the assistive technology user.

In addition, since client-side scripting relies on client tools and configuration, it can be less secure than server-side methods. For instance, if you use JavaScript to validate a form before it gets set to your server and your user disables JavaScript that form data does not get validated.

Using JavaScript.

Javascript is one of the most popular scripting languages for web development. In addition to libraries of Javascript code available online, two of the most popular web development tools, FrontPage and Dreamweaver, include easy-to-access code snippets that add little "extras" to web pages. Developers should use caution when deciding to include Javascript or other scripting elements on their pages. Here are a few of the most popular uses for Javascript and some of the accessibility issues to consider:

  • onClick – The onClick event handler is triggered when the user clicks once on a particular item. It is commonly used on links and button elements and, used in connection with these elements, it works well with screen readers. If clicking on the element associated with the onClick event handler triggers a function or performs some other action, developers should ensure that the context makes that fact clear to all users. Do not use the onClick event handlers for form elements that include several options (e.g. select lists, radio buttons, checkboxes) unless absolutely necessary.
  • onMouseOver and onMouseOut – These two event handlers are very popular on many web sites. For instance, so-called rollover gif's, which swap images on a web page when the mouse passes over an image, typically use both of these event handlers. These event handlers neither can be accessed by the mouse nor interfere with accessibility – a screen reader simply bypasses them entirely. Accordingly, web designers who use these event handlers should be careful to duplicate the information (if any) provided by these event handlers through other means.
  • onChange – This event handler is very commonly used for triggering JavaScript functions based on a selection from within a <select> tag. Surprisingly, it presents tremendous accessibility problems for many commonly used screen readers and should be avoided. Instead, web developers should use the onClick event handler (associated with a link or button that is adjacent to a <select> tag) to accomplish the same functions.

For more information on accessibility issues when using Javascript, see:

Applets and Plug-ins.


M.W.A.S. Logo

12)When a web page requires that an applet, plug-in or other application be present on the client system to interpret page content, the page must provide a link to a plug-in or applet that complies with standards 1-9 of the MWAS. Modification of 29 U.S.C. 794d 1194.22(m). (M.W.A.S. 13)

While most web browsers can easily read HTML, text, and Rich Text and display it to the user, several private companies have developed proprietary file formats for transmitting and displaying special content, such as multimedia or very precisely defined documents. Because these file formats are proprietary, web browsers cannot ordinarily display them. To make it possible for these files to be viewed by web browsers, add-on programs or "plug-ins" can be downloaded and installed on the user's computer that will make it possible for their web browsers to display or play the content of the files.

This provision requires that web pages that provide content such as Real Audio or PDF (Adobe Acrobat's Portable Document Format) files also provide a link to a plug-in that will meet the software provisions. It is very common for a web page to provide links to needed plug-ins. For example, web pages containing Real Audio almost always have a link to a source for the necessary player. This provision places a responsibility on the web page author to know that a compliant application exists, before requiring a plug-in.

Here is an example from the WAC's links page:

Training Video on PDF Accessibility from AccessIT [wmv] (requires Windows Media Player): “PDF Accessibility” a presentation by Terry Thompson, Technology Specialist with AccessIT, offers detailed help with evaluating PDF files for accessibility and creating accessible PDF using MS Word and Adobe Acrobat plug-ins.

WAC provides a link to the streaming video file, and a link to the Windows Media Player download page, to allow users who don't have the WMP plug-in installed to access video.

WAC best practiceNote that we also indicate that the document is something other than standard HTML in the text of the link itself (by adding "[wmv]" -- windows media video). This insures that users who navigate the page using a "Links List" will also be aware that this link requires an additional plug-in and may cause conflicts with the user's assistive technology or may require additional download time/resources to access.

Go to next tutorial page.
Next

return to top

 

 

divider

Organizing and Naming Your Site | Layout | Header Information | Navigation | Color | Style Sheets | Lists | Images and Multimedia | Image Maps | Tables | Forms | Frames | Scripts | Timed Response |

| Key to Guidelines | Validating Your Site |

| Start of Tutorial |

| View the entire tutorial in HTML format. |
| Download/print the tutorial in MS Word document format. |