Avoid JavaScript links | |
WAI / WCAG 1.0 Priority 2 checkpoint 6.5 | |
Issue Description The page contains a link that can be followed only by browsers that support JavaScript. |
|
How to fix
Replace the link that directly starts the script with other ways to start it, like defining a button, separately defining the script (remember also the NOSCRIPT element) and binding an event (like ONKEYPRESS and ONCLICK) on the button to the script. |
|
Issue Explanation Links that activate scripts can only be followed by browsers capable of executing JavaScript. Not all browsers are able to execute JavaScript. Consider for example textual browsers like lynx [http://lynx.browser.org] , or browsers coupled with screen readers, or browsers for PDAs or cellular phones. A user with such browsers would not be able to navigate the page. Even if other ways to reach that destination are available (i.e. links or buttons), the user would face such a link, and assume that it would work as any other does. However, the browser's failure to follow it the link could possibly increase user frustration and confusion. |