culturalanomoly
culturalanomoly

Reputation: 1301

Adding Web Accessibility Support in JavaScript

Would adding WAI ARIA support, through JavaScript, be sufficient to support devices that assist users with disabilities? The script would enhance the markup to make a site more compliant with WAI/ADA recommendations (i.e., adding tabindex, aria- attributes/elements etc.). The concern is that users with disabilities may use devices that don't support JavaScript, thus rendering this approach futile.

Upvotes: 0

Views: 290

Answers (1)

FelipeAls
FelipeAls

Reputation: 22171

Disabled users also are 98 or 99% to surf with JS activated so yes it'll work for most of them (source: latest WebAIM survey).
BUT this method leads to unmaintainable code: it'll break each time a dev or web designer modifies HTML and CSS and JS (and backend?) code (or even a content writer if it's also corrected by your scripts) and you'll have to modify your scripts or worse you won't notice it's now broken in screen readers and other assistive technologies.

It won't correct the contrast ratio between text and background (though it's rarely done once a website is launched).
It won't correct bad semantics, or you'll have to do it in JS on a poor existing HTML code instead of modifying directly templates. Why not make things the less complicated way, it's hard enough to refactor an existing site without breaking things!
It won't modify non explicit links, bad hierarchy of headings, underline links in text and bring back outline (do it directly in CSS).
If you can't zoom at least up to 200% (both in text mode and image+text mode), it won't change anything. Etc

Accessibility is far more than tabindex (make unfocusable elements that should be focusable real link and button elements instead of allowing focusing but without the rest of their behavior).
ARIA needs a modern screen reader to be perceived... and a screen reader to begin with. A magnification device isn't compatible with ARIA for example. That's great for blind people and some partially sighted users (those that use a SR) but not other disabled people.
Web Content Accessibility Guidelines (WCAG 2.0), the W3C/WAI Recommendation for web content has a wider scope to improve accessibility. WAI/ARIA has tremendous possibilities for applications (those that were impossible to use on the web and needed to install a software a few years ago) and advanced components but it should come after WCAG 2.0 (as a complement).

Upvotes: 3

Related Questions