In my article over on the main part of the site:
https://cutcodedown.com/blog/20190812.ARIA_Roles_-_Why_do_these_existI really took Aria roles to task, but I'm just curious what everyone else thinks of them. The more I read on the topic the more silly and pointless they seem; yet at the same time I've come to find out that 90%+ of how I've seen them used in the wild is
WRONG!For example:
<form role="form">
Is complete nonsense. That's not what the FORM role under WAI-ARIA is for! If one takes the time to digest and understand the specification, the roles exist to say what something should be when you're using the WRONG tag, and when possible you should in fact use the correct tag...
... which begs the question, in what scenario could you be that you can add a role attribute, not not change the flipping tag to the correct one? Why is using the correct markup so hard, and so difficult, that throwing more code at it in the form of attributes is the correct answer?
I just don't see where/how/why this would be a useful feature or anything more than pointless code bloat. "Oh I want a DIV to have the semantics of an UL" -- why not just use a UL then?
I'm really curious what other people's take on this one is. I feel like I'm missing some part of the puzzle... and I'd rather not chalk it up to "oh it's for people too stupid to write HTML properly."