What to consider before using ARIA

(Read 501 times)

When developers discover ARIA and try to misuse or overuse it we get more problems than we may have before. It’s not just that, even if they do everything correctly we risk to have an inaccessible product due to missing support of theoretically great ARIA.

I worked hard to inform people around me about the importance of accessibility. It takes time, but it’s totally doable. Everybody can understand it when they are made to think beyond. I still have to work on it but I like the current level of awareness I was able to help them reach. But awareness alone is not enough – it can even be dangerous. In this post I will focus on the technical part of accessibility, especially ARIA (Accessible Rich Internet Applications, opens in new window) and what to be careful about it.

ARIA gives developers additional semantics that is missing from HTML. It’s based on concepts and needs that were established with Windows 98 and beyond. That’s one of the main reasons for some problems with it, I think. Some aspects of desktop PC semantics from previous millennia can’t really be applicable to present mobile, as an example. I was also surprised to learn that some parts of ARIA can’t even be supported on non-Windows desktop computers like Mac. Mac’s accessibility APIs just don’t support all of ARIA. Reasons for that are simple, naming just one of the most obvious – it isn’t possible to support something that is not there, as for example tree view.

In modern times we have to think beyond patterns from Windows – for example mobile devices. When we compare native mobile applications with desktop it’s quite obvious that a lot of desktop semantics can’t really be relevant for mobile devices. But that’s not the whole problem.

Some ARIA is only available in theory and some ARIA is widely unsupported

We have quite a lot of ARIA attributes available to us. I found that we have at least 53 different aria attributes available at the time of writing:

  1. aria-activedescendant
  2. aria-atomic
  3. aria-autocomplete
  4. aria-braillelabel
  5. aria-brailleroledescription
  6. aria-busy
  7. aria-checked
  8. aria-colcount
  9. aria-colindex
  10. aria-colindextext
  11. aria-colspan
  12. aria-controls
  13. aria-current
  14. aria-describedby
  15. aria-description
  16. aria-details
  17. aria-disabled
  18. aria-dropeffect
  19. aria-errormessage
  20. aria-expanded
  21. aria-flowto
  22. aria-grabbed
  23. aria-haspopup
  24. aria-hidden
  25. aria-invalid
  26. aria-keyshortcuts
  27. aria-label
  28. aria-labelledby
  29. aria-level
  30. aria-live
  31. aria-modal
  32. aria-multiline
  33. aria-multiselectable
  34. aria-orientation
  35. aria-owns
  36. aria-placeholder
  37. aria-posinset
  38. aria-pressed
  39. aria-readonly
  40. aria-relevant
  41. aria-required
  42. aria-roledescription
  43. aria-rowcount
  44. aria-rowindex
  45. aria-rowindextext
  46. aria-rowspan
  47. aria-selected
  48. aria-setsize
  49. aria-sort
  50. aria-valuemax
  51. aria-valuemin
  52. aria-valuenow
  53. aria-valuetext

These attributes are theoretically used to:

  • make advanced widgets that are not available in the HTML,
  • allow us to make live regions and specify how they behave,
  • establish relationships between information in HTML,
  • add semantics about states,
  • define and even overwrite properties.

I’ve seen quite a lot of ARIA used wrongly and that’s naturally causing problems for assistive technology users. WebAIMs project Million (opens in new window) that scans a million webpages with automatic accessibility testing tool established that home pages with ARIA present averaged 70% more detected errors than those without ARIA.

Home pages with ARIA present averaged 70% more detected errors than those without ARIA.

WebAIM Million project on use of ARIA related with more errors (opens in new window).

Please don’t take this fact in isolation though. I think it has a lot to do with the ability of automatic accessibility tools detecting problems mainly in code. And the more ARIA used automatically mean we can detect more code-oriented errors. Like wrong syntax, missing required children and so on. Such kind of errors can be prevented with proper tools and processes and I think are not the main problem with ARIA.

Besides using wrong syntax – that can easily be prevented – the next problem is to use ARIA wrongly. As for example Adrian Roselli’s article “Donโ€™t Use ARIA Menu Roles for Site Nav” (opens in new window) has to say about menu roles and why not to use them. It drills down to parts of ARIA that were meant to mimic old patterns in Windows 98, I think. And it’s very attractive for people new to ARIA to think “I must make a menu, nice there is ARIA with that role. I will use it to improve the semantics”. Why are they wrong is nicely defined by Adrian and I suggest you read it before you use it, but from my perspective it’s just a single example of misuse of ARIA.

I think that besides ARIA misuse, the main problem with ARIA is to use ARIA syntax properly, only to find out it’s not really supported in reality.

The main problem of ARIA, after ARIA misuse, is that we can write valid and proper code and think we have solved problems for everybody, only to find out it’s not really supported for most.

My reflection about some parts of ARIA.

It doesn’t really help if we make an complex widget from scratch, investigate how ARIA should support it, implement it by the rules and then find out it doesn’t actually work for most of our users with screen-readers, because it’s not (yet) supported. I hope we can agree with this.

Here comes the stage after awareness into consideration. We are aware that we need proper semantics in code to make things accessible. We know about ARIA, just enough to use it correctly and make valid code. But if we don’t know about gaps in support then we risk releasing non-accessible products anyway. Potentially products that used a lot of resources trying to make things work out. But then failing at the end due to theoretically perfect solutions that fail in practice.

Stage after accessibility awareness may lead us on wrong paths, for example believing that all ARIA is supported and making theoretically correct interfaces that don’t work in practice.

My reflection on theory versus reality after awareness stage.

ARIA needs to be planned and tested with assistive technologies in mind

The solution to missing support is not a simple one. We can create support tickets, lobby, maybe even fund vendors, but it is probably not very sustainable and practical if we want the support now, because we have to deliver.

So we should maybe take a step back, know our end users and what (assistive) technology they actually use and then plan accordingly. In some cases that’s simple, in others it’s impossible. When we do have the data we can be more efficient. When we don’t have the data we have a potential design changes in our hands.

What does the design have to do with ARIA? Well, I am not talking about visual design alone, I am talking about user experience for all users. Maybe there is a widget that can be simplified and maybe we can drop advanced ARIA altogether.

Maybe we can simplify the interactions so that we don’t need ARIA and actually make it easier for all users, even those that don’t really need ARIA.

I liked Eric Bailey’s article “ARIA is Spackle, Not Rebar” (opens in new window), that was writing about similar things years before me. Using HTML more and ARIA less, but learning more about both and how to test would be my summary of it, but please read it as well.

ARIA support should be documented by vendors

I love the Accessibility Support project (opens in new window) where I can easily find out about what works and what doesn’t work (well enough) in different screen-readers and other assistive technologies. We need to appreciate the manual testing that went into it. And that still needs to go into it. It’s a community project found on GitHub (opens in new window) where anybody can contribute. But that’s also the problem – it needs the community to follow up on different versions, test and document it and publish findings.

I really think it should be the vendors that will document what they support, where and how. I know that there are vendors that expose this info if we drill down in different sources, but if we want developers to have the information vendors should do better.

It would be amazing if we had Accessibility Support-like project where all assistive technology vendors would document their part on support. For example aria-errormessage support that would then include all screen-readers and totally up-to-date info if they support it or not, plans for when it will be supported and test documentation.

Then we could always know when we can use which ARIA and when not and I am sure it would make the web more accessible.

Author: Bogdan Cerovac

I am IAAP certified Web Accessibility Specialist (from 2020) and was Google certified Mobile Web Specialist.

Work as digital agency co-owner web developer and accessibility lead.

Sole entrepreneur behind IDEA-lab Cerovac (Inclusion, Diversity, Equity and Accessibility lab) after work. Check out my Accessibility Services if you want me to help your with digital accessibility.

Also head of the expert council at Institute for Digital Accessibility A11Y.si (in Slovenian).

Living and working in Norway (๐Ÿ‡ณ๐Ÿ‡ด), originally from Slovenia (๐Ÿ‡ธ๐Ÿ‡ฎ), loves exploring the globe (๐ŸŒ).

Nurturing the web from 1999, this blog from 2019.

More about me and how to contact me: