logoalt Hacker News

xigoiyesterday at 5:29 PM1 replyview on HN

> If I look at their component library, they also do the work of including aria attributes for you

Using ARIA attributes instead of semantic elements is bad for accessibility.


Replies

rhdunnyesterday at 6:07 PM

How are ARIA roles/attributes bad for accessibility?

Sure, if there is a HTML element that works then use it, but not every UX pattern is expressible in HTML without specifying roles/attributes (e.g. tabs [1]) and not all browsers support recent HTML elements/attributes (such as using details/summary for accordions).

ARIA patterns [2] has a list of examples for UX components and their examples specify/use ARIA roles/attributes.

[1] https://www.w3.org/WAI/ARIA/apg/patterns/tabs/

[2] https://www.w3.org/WAI/ARIA/apg/patterns/

show 1 reply