Section
508 (l)&(m) W3C Guidelines 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.
- Anchor elements are required not to use
JavaScript for the link target when the NOSCRIPT element is not
present in the document body
- AREA elements are required not to use
JavaScript for the link target when the NOSCRIPT element is not
present in the document body
- When SCRIPT Elements are used, the NOSCRIPT
element is required in the document body
This guide is derived from the book
Understanding Accessibility, Published by HiSoftware Publishing...
The Entire book can be viewed online in accessible HTML Help format.
- If you use the SCRIPT element
use the NOSCRIPT element
- Do not use script in ANCHOR
elements
- Do not use script in AREA
elements
1. If you use the SCRIPT element
use the NOSCRIPT element
Example one demonstrates the proper usage of the
NOSCRIPT element
The current HTML uses the script element that
can be used to open another browser window. This is used to present the
user with an offer.
<SCRIPT language="JavaScript">
<!-- function popwin(){
window.open('http://www.hisoftware.com/acctest.htm','','width=400,height=200,
scrollbars=1');
} // --> </script>
The corrected HTML uses the NOSCRIPT element for
the SCRIPT element. This assures that users who do not have a browser
that supports scripts receive the same offer.
<SCRIPT language="JavaScript">
<!-- function popwin(){
window.open('http://www.hisoftware.com/acctest.htm','','width=400,height=200,
scrollbars=1');
} // --> </script>
<noscript> This pages used JavaScript to display a pop-up window that
points a user to <a href="http://trial.accessibilitywatch.com/scripts/tryaccwmh.exe"
class="thenav">WebSite Accessibility Testing and Repair Solutions
trial</a>
This link is for a trial of the web site accessibility testing
service</noscript>
top
2. Do not use script in
ANCHOR elements
Example two demonstrates how to correct
ANCHOR elements that use script.
The current HTML uses a JavaScript function to
navigate within an ANCHOR element. This is unwise and should not be
done.
<a href="javascript:displayWindow('sample.htm',360,145)">
The corrected HTML uses a direct link to the
page.
<a
href="http://www.hisoftware.com/sample.htm">
NOTES – EXAMPLE 2
Using JavaScript in your anchors could work
for most visitors, however, the complexity of the NOSCRIPT element
should deter you from doing this. It is recommended to NOT USE
JavaScript in ANCHOR elements.
top
3. Do not use script in AREA
elements
Example three demonstrates how to correct AREA
elements that use script.
The current HTML uses a JavaScript functions to
for links in AREA elements. This is unwise and should not be done.
<map name="FPMap0">
<area href="javascript:displayWindow('hit.htm',360,145)" shape="rect"
coords="61, 24, 132, 92">
<area href="javascript:displayWindow('miss.htm',360,145)" shape="rect"
coords="16, 101, 179, 215"></map>
<img border="0" src="PE01496_.gif" width="184" height="217" usemap="#FPMap0"
alt="Target Image"></p>
The corrected HTML uses a direct link to the
page.
<map name="FPMap1">
<area href="hit.htm" coords="61, 24, 132, 92" shape="rect">
<area href="miss.htm" coords="16, 101, 179, 215" shape="rect"></map><img
border="0" src="PE01496_.gif" width="184" height="217" usemap="#FPMap1"
alt="Target Image"></p>
top
Printer Friendly Version...
|