Using scripts to animate your web-page
This lesson explains how to introduce scripts and multimedia in a way that is accessible. First you should make the script or application as accessible as possible, but you will also need to provide an alternative for those who still cannot use the application for whatever reason.
Java can add functionality and excitement to a web page. Unfortunately most assistive software does not handle Java well, and some people prefer not to allow Java to work on their computer for security reasons. This does not mean that you should not use Java to make your page more interesting - but it does mean that you need to take care to use accessible options where these are available and to always provide an HTML alternative in order to make the page universally accessible.
For all Java applications that deliver content, or provide a user function on the page you need to provide a <noscript> alternative that either presents the same information (such as a set of navigation links) or provides a link to a page that delivers the same content without using Java.
<-- some scripted application
Note that the <noscript> alternative follows on immediately after the closing </script> tag.
If you employ a script that does not affect the page - such as the GoogleAnalytics script for monitoring web usage - there is technically no need to provide a <noscript> alternative. However, in instances where automated testing services flag this as an error it is possible to add a <noscript> alternative that does nothing (except satisfy the stupid robot). This needs to have some content to avoid being scored down for an empty alternative, we have found that <noscript><!- - stupid robot --></noscript> works well!
In order for these events to work for keyboard users (those not using a mouse) it is important to add the OnFocus and OnBlur events to perform the same task when the Tab key is used for navigation.
Some functions do not yet have keyboard alternatives (for example OnMouseDown, OnMouseMove and OnClick) so are best avoided.