RE: Aria roles

Bear in mind that ARIA is more of a “promise”.  ARIA alone doesn’t actually change any behaviors.  For a concrete example, if you make a link claim (through aria) that it’s a button, you also must use JavaScript to make it *act* like a button.  It has to respond to the spacebar, not just the enter key.

Most ARIA role changes will have behaviors that have to be built manually, and you may have to dig pretty deep in the w3c specs to be sure you understand them.

In my opinion using aria where native HTML could suffice is a red flag that the site needs extra attention in an audit.  Using ARIA like this can be an indication the devs didn’t really understand accessibility, but thought they did, and that tends to result in a more accessibility errors than completely ignorant developers.

From: Bristow, Alan <Alan.Bristow@elections.ca>
Sent: Wednesday, April 7, 2021 06:06
To: Ms J <ms.jflz.woop@gmail.com>; w3c-wai-ig@w3.org
Subject: Re: Aria roles

​Hi Sarah,

The ARIA spec is your friend here
https://www.w3.org/TR/using-aria/#firstrule<https://urldefense.com/v3/__https:/www.w3.org/TR/using-aria/*firstrule__;Iw!!C5qS4YX3!XxW62ijOt64v98q0mrNQw7TMpsv5P7qehjndT8DFB8xVp9pbuw4XEpn365Fw4cTLdg$>

It says:

If you can use a native HTML element [HTML51<https://urldefense.com/v3/__https:/www.w3.org/TR/using-aria/*bib-html51__;Iw!!C5qS4YX3!XxW62ijOt64v98q0mrNQw7TMpsv5P7qehjndT8DFB8xVp9pbuw4XEpn365H0TT507w$>] or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.

W3's emphasis, not mine (though I agree with it entirely).

So while sometimes a restrictive back-end will not allow a particular type of HTML in a location, and then perhaps ARIA is needed to bend the "wrong" HTML to the role, this is sad and clearly not ideal (a better back-end publishing system would be an improvement).

In a11y audits, generally I look for ARIA being used where there is not an HTML alternative; where it is adding to the HTML story rather than replacing it. For example, an open menu using aria-expanded="true" (etc) is a great addition to the semantics of a page.

I hope that's helpful and not too ARIA-101.

Regards,

Alan

-Alan Bristow
Web Programmer
Elections Canada
alan.bristow@elections.ca<mailto:alan.bristow@elections.ca>




From: Ms J <ms.jflz.woop@gmail.com<mailto:ms.jflz.woop@gmail.com>>
Sent: Wednesday, April 7, 2021 8:51 AM
To: w3c-wai-ig@w3.org<mailto:w3c-wai-ig@w3.org>
Subject: Aria roles


Hi all


I was wondering if there was anything that specified whether aria roles should be applied to specific elements. For example, I have often seen websites implement a lot of their functionality using links, and then give the links new aria roles  such as ‘button’ or ‘radio’ to indicate their purpose rather than using the proper element in the first instance. Is this likely to cause any issues?


Thanks


Sarah


Get Outlook for iOS

Received on Wednesday, 7 April 2021 14:10:51 UTC