4.4 Incorporating alternatives
The above technique does not solve the accessibility issues with AJAX but it is likely to help a user who chooses to use AJAX on a page. It is also not only users with screen readers that are excluded from the latest JavaScript implementations. Users without the ability to access the JavaScript content need to be given the ability to interact with the content. This requires that a page is designed to work without JavaScript. W3C state that “Distinguishing the structure of a document from how the content is presented offers a number of advantages, including improved accessibility, manageability, and portability.” (Chisholm, et al, 2000). Following the same principles that result in accessible structure I argue that one also needs to separate ECMA Script and dynamic updates. Take for example the following code-:
<p><a href=”javascript:dofunction()”>Click this link</a></p>
There is no option for having scripting disabled. The link would not work and a user would be disallowed access to the functionality that it produces. JavaScript does however offer a useful way around this without having to use noscript tags everywhere. Adding event listeners through JavaScript changes the way an element behaves. Now we can have the following code-:
<p><a href=”alternativePage.html” id=”myDynamicLink”>Click this link</a></p>
This is a standard html link but a function can be run when the page loads to assign a JavaScript function to the link that is activated on an event. This method of using dynamic scripting on a page uses it as an added extra as the site would run fine without it. There are cases where this is not possible due to the complexity of the coding. WCAG 11.4 states:
“If, after best efforts, you cannot create an accessible page, provide a link to an alternative page that uses W3C technologies, is accessible, has equivalent information (or functionality), and is updated as often as the inaccessible (original) page. “(Chisholm, et al, 2000).