|
Section 508 Web Accessibility
- Scripting Languages Guidelines
§1194.22(l) When pages utilize scripting languages to
display content, or to create interface elements, the
information provided by the script will be identified with
functional text that can be read by assistive technology.
Checkpoint
Does the page contain client-side scripting languages?
Explanation
Client-side scripting languages are coded in with the page's content and
HTML tags, and are executed by the user agent (i.e. web browser). If
necessary, you can check for the presence of a scripting language on a
web page by reading through the source code for the <script> tag
(e.g. <script src="scriptname.js" language="JavaScript1.2">).
Checkpoint
Are all scripting language-controlled links accessible by assistive
technology?
Explanation
A rollover button script uses graphical images as link buttons.
The image changes when the mouse pointer moves over it.
A "pull right" menu script makes use of additional navigation
selections that "slide" out from a main navigation selection (e.g.
if you placed the mouse pointer over a menu item that says
"Personnel," a new list of menu items reading "Management,"
"Support Staff," and "Research Team" will appear either to the
side or underneath the "Personnel" selection).
Guidelines
Assistive technology must be able to read and announce the presence
of all links within a scripting language-controlled navigation
system.
For rollover buttons, ensure that all graphic images contain the
alt attribute.
In the event that such a navigation system cannot be accessed by
assistive technology (e.g. the event handler triggering the script
cannot be activated through the keyboard), or because the user does
not access the page with a mouse (e.g. blind or quadriplegic users),
the script will need to be rewritten to make use of keyboard
commands, or an additional navigation mechanism that contains
hyperlinks will have to be created.
WARNING: If this additional navigation is placed inside
<noscript></noscript> tags, it will not be read by
assistive technology when the browser's scripting capabilities are
left on (in such a case, the browser will correctly ignore the
<noscript></noscript> tags). The
<noscript></noscript> tags should be used to
accommodate those with older browsers or text browsers, but the
same exact menu must also be made available somewhere outside of
the tags.
NOTE: The majority of assistive technologies can negotiate rollover
button navigation mechanisms, but many still have difficulties
with "pull right" menus.
Checkpoint
Is the content on script-manipulated graphics reflected in their
respective alt attribute value?
Explanation
In addition to rollover buttons that are apart of a navigation mechanism,
scripts can also cause content-bearing graphics that do not come in contact
with mouse movement to appear and be replaced.
Guidelines
As with any graphical image, content contained on a graphic and its
<img> tag's alt attribute must be identical. However, although
the <img> tag that positions the original graphic (i.e. the graphic
that appears when the page first loads) will contain an alt attribute,
the alt content does not change when the image does. Therefore, all
content that is displayed on images must be duplicated somewhere on the
page, or be made accessible via a link.
Checkpoint
Does the page's form validation mechanism accommodate assistive
technology?
Explanation
Form validation is the act of ensuring that all information entered
into an electronic form is of the correct format, or of ensuring
that required fields have been filled in. Scripting
language-controlled form validation is particularly susceptible to
assistive technology incompatibility.
Guidelines
Assistive technology must be able to read the content displayed in any
form validation alert box, and must allow the user to select the OK
button (or any other buttons that might be present) to clear the alert
box and return to the form. The majority of assistive technologies are
capable of performing these tasks.
Another way of passing this checkpoint is to write the form validation
script so that the form page refreshes with alerts as to which fields
were improperly filled in or left blank printed on the page itself;
assistive technologies will read these alerts as it would any other
content.
Because assistive technology cannot ascertain the color or any
other style characteristic of screen font, do not instruct users
to re-enter or correct entries marked in red or marked in bold.
Checkpoint
Does the page's form validation mechanism move the cursor to a
specific field in a way that assistive technology cannot track?
Explanation
As an example, a form validation script might automatically move the
cursor to a field that was entered incorrectly.
Guidelines
Assistive technology must allow the user to know which field the cursor
has been moved to. Generally, assistive technologies provide the user
with the ability to hear the name of the form element in which the cursor
currently resides.
It is the developer's responsibility to ensure that the cursor is
correctly relocated to the form field that needs correcting.
Checkpoint
Does the page's form validation mechanism change or update other
fields in the form in a way that assistive technology cannot track?
Explanation
As an example, the form might have a mechanism that allows the user to
fill in a numerical value for a particular year, then click a button that
automatically fills subsequent year form fields with the identical value.
Guidelines
Assistive technology must identify the new value to the user. Generally,
assistive technologies provide the user with the ability to hear the name
of the form element in which the cursor currently resides. If such an
update occurs in fields following the auto-fill mechanism button, the
assistive technology will read the new value when the cursor arrives at
that form field.
It is the developer's responsibility to ensure that the correct values are
placed inside the form fields.
Checkpoint
Is the script device-independent?
Explanation
Several event handlers require a specific kind of input device.
Input devices may include pointing devices (such as the mouse),
keyboards, braille devices, head wands, microphones, and others.
An example of a device-dependent script is onDblClick: it requires
a mouse, but there is no keyboard equivalent for double clicking,
so a user that does not use a mouse cannot access content or
perform a function provided by onDblClick.
Guidelines
Scripting must be device-independent or provide multiple input and
output options for different devices.
|