Scripts and Forms
Pages Are Usable When Programmatic Elements Are Not Supported
WAI Definition (Checkpoint 6.3)
Ensure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported. If this is not possible, provide equivalent information on an alternative, accessible page.
Explanation
Scripts (such as JavaScript) are often used to dynamically create or display the content that appears on a web page, for example, to validate form entries or to display menus.
If the scripts are not supported (for instance, JavaScript is deactivated), the content and functionality of the page should still be available.
Scripting as referred to in the section is client-side scripting.
Rationale
Some browser configurations or some organizations that have proxies may turn off the client-side scripting. Old browsers may not support scripting. Dynamic drop-down menus, in particular, are known to cause significant accessibility problems for people with motor or visual impairments, for example when screen magnifiers are used. Therefore, they should not be used.
Applets and/or support for applets (particularly Java) may require downloads before running. Download time with slow connection and security issues can also present a problem for usage of applets.
Technique
- Do not use JavaScript as a link target. A user agent that does not support JavaScript will not be able to follow the link,
- Use the <noscript> tag. User agents that do not support scripting will display the contents of the <noscript> tag.
- Use server-side scripts instead of client-side scripts. If you use a client-side script and the client does not support this technology, the user will not be able to access the content or features provided by the script. But in many cases, the same functionality can be achieved using a server-side script.
- As a last resort, provide an up to date text equivalent of the information on an alternative page.
Validation
Test
Using the Firefox Web Developer's Toolbar (plugin):
Go to Disable > Disable JavaScript > All JavaScript; then select Disable Java
Success Criteria
The page is still usable. There is no critical function missing (check especially that the menu remains visible and that forms can still be submitted).