Skip to main content

Scripts used for background processing and pop-up

Web checkpoint 5

On this page:



Scripts that are used only for background processing, and that do not affect the user interface, do not impact accessibility. Therefore, no additional accessibility techniques are required or recommended for these scripts.

JavaScript code that executes in the browser is called client-side a script. Using client-side scripts for background processing has many advantages; it is quicker for the user, relieves the load on the Web server, and reduces the bandwidth requirements. Such background JavaScript processing functions do not affect accessibility for the assistive technologies that support scripts. For example, JavaScript is often used to validate forms on the client before submitting them to the server. Scripts can verify the length of a password, that two instances of an e-mail id are the same, or that all the required fields are completed.

Scripts that are used for alerts generally make use of a pop-up window or dialog box. These pop-up windows and dialog boxes are accessible to assistive technologies, and therefore, no additional techniques are required or recommended. In fact, scripts of this type are sometimes necessary in order to support some of the functionality required by other accessibility checkpoints.For example, without active scripting it would be difficult to alert users about the expiration of a timed response. A scripted alert or message box is one way to implement Checkpoint 14: Timed responses support.

In the example below, a user is asked to enter a date, and a client-side script validates the date. If the user enters an invalid date, and tries to submit the form, an alert box appears that tells the user the date is not valid. Pop-up windows are well supported by current assistive technology, therefore, as long as the form is coded for accessibility according to Web Checkpoint 7: Forms, then no additional accessibility techniques are required.

(MM/DD/YYYY)
Technique summary of scripts used for background processing and pop-ups
Required: Recommended:
None Required None Recommended