ginger's thoughts

Silvia's blog

A systematic approach to making Web Applications accessible

With the latest developments in HTML5 and the still fairly new ARIA (Accessible Rich Interface Applications) attributes introduced by the W3C WAI (Web Accessibility Initiative), browsers have now implemented many features that allow you to make your JavaScript-heavy Web applications accessible.

Since I began working on making a complex web application accessible just over a year ago, I discovered that there was no step-by-step guide to approaching the changes necessary for creating an accessible Web application. Therefore, many people believe that it is still hard, if not impossible, to make Web applications accessible. In fact, it can be approached systematically, as this article will describe.

This post is based on a talk that Alice Boxhall and I gave at the recent Linux.conf.au titled “Developing accessible Web apps – how hard can it be?” (slides, video), which in turn was based on a Google Developer Day talk by Rachel Shearer (slides).

These talks, and this article, introduce a process that you can follow to make your Web applications accessible: each step will take you closer to having an application that can be accessed using a keyboard alone, and by users of screenreaders and other accessibility technology (AT).

The recommendations here only roughly conform to the requirements of WCAG (Web Content Accessibility Guidelines), which is the basis of legal accessibility requirements in many jurisdictions. The steps in this article may or may not be sufficient to meet a legal requirement. It is focused on the practical outcome of ensuring users with disabilities can use your Web application.

Step-by-step Approach

The steps to follow to make your Web apps accessible are as follows:

  1. Use native HTML tags wherever possible
  2. Make interactive elements keyboard accessible
  3. Provide extra markup for AT (accessibility technology)

If you are a total newcomer to accessibility, I highly recommend installing a screenreader and just trying to read/navigate some Web pages. On Windows you can install the free NVDA screenreader, on Mac you can activate the pre-installed VoiceOver screenreader, on Linux you can use Orca, and if you just want a browser plugin for Chrome try installing ChromeVox.

1. Use native HTML tags

As you implement your Web application with interactive controls, try to use as many native HTML tags as possible.

HTML5 provides a rich set of elements which can be used to both add functionality and provide semantic context to your page. HTML4 already included many useful interactive controls, like ,

Comments

  1. David B
    Hey - thanks for the great walk thru on how to structure an approach to thinking about accessible design. db
    1. silvia
      @db pleasure!
  2. really?
    the tab order on your own site (this one) Leave a Reply fields are first... huh..? Then it jumps to the middle of your article...? Then steps through all the nav links on the right...? Then finally steps through your content interactive elements, except for the section I mentioned above @Pot, meet @Kettle
  3. Jonathan
    Wow, I am totally blown away. Thank you so much for this. I have never made a website super accessible, but am INSPIRED to do so now :)
  4. silvia
    @really? Hahaha, you are right. The tab order on this page is very broken (I should have mentioned this). This is because much of it is created by WordPress and I don't want to go hacking into the WordPress source code. The idea from a WordPress perspective to jump to the reply field first seems to make sense when you want people to provide input on the article first. The problem is that re reply field and those elements in the middle of the page have an explicit tabindex, thus being the first to be addressed (it's the problem I describe in the article). The thread at http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-November/033775.html is suggesting (again) to introduce scoped tabindexes into HTML. There's a real need, but we haven't found the best way to do that yet.
  5. silvia
    @Jonathan awesome! Do make the world a better place!!
  6. silvia
    Received through twitter from @TinaHolmboe: There's oddities in there. Why implement a menu with div instead of ul and links, and why the strange ALTs? Reply: You can implement the menu with ul and links, too, but these are not any more semantically appropriate than the divs. In particular your default styling will not be appropriate. You still need to do the @role changes. Also, I don't understand your question about @alt - empty alt tags are relevant to AT.
  7. Tina Holmboe
    "You can implement the menu with ul and links, too, but these are not any more semantically appropriate than the divs." This confuse me. Surely a list of links (or list of buttons) is far more semantically correct than a div? As for the ALT-texts - yes. Empty alt *attributes* are relevant, but some of the examples chosen are, frankly, rather poor and convey little in the way of information similar to that which is meant communicated by the image.
    1. silvia
      @Tina It's up to you to choose which elements are most appropriate to create your custom control. I am not prescribing the use of divs for menus. I only care that we need to add the semantic role. As for the ALT text: feel free to provide better alt text. I am only making examples and explaining how it's done.
  8. Liam Quin
    It's always a pleasure to see articles on accessibility. A couple of comments: (1) I had to increase the font size five times to be able to read the text of the article. People over 40 use the Web too :D (2) @alt is actually an attribute, not a tag (pedantic, I know, but it's a source of confusion for people when they try to learn XML technologies in particular, since we have elements with attributes, and not just tags!) Might be a good idea to add a title attribute to the image example, to show the difference between title and alt. But before long we'd get into longdesc, and where would it end? :-) Thanks again for posting!
    1. silvia
      Hi Liam, thanks for your feedback. I've changed "tag" to "attribute" where appropriate - I didn't even notice that lapse! BTW: I AM over 40! And yeah, zoom helps.
  9. Liam Quin
    @silvia thanks!
  10. Hamish
    Hi Fantastic post and am passing it on to our dev guys, really well explained and the code examples are priceless. Keep up the great work.
  11. Henny Swan
    Sylvia, this is just the kind of in depth outline that helps people get to grips with this stuff - thank you. So, when's the book coming out ;)
  12. Jason
    Nice writeup! Thanks for the reminders and examples.
  13. Aarielle
    Thanks Silvia. A very enjoyable article although I must admit it made my head hurt by the time I finished reading it!