CutCodeDown

From CutCodeDown => Drive-By's => Topic started by: Jason Knight on 22 Oct 2019, 02:52:07 pm

Title: Aria roles... important or silly?
Post by: Jason Knight on 22 Oct 2019, 02:52:07 pm
In my article over on the main part of the site:

https://cutcodedown.com/blog/20190812.ARIA_Roles_-_Why_do_these_exist

I 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:

Code: [Select]
<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."
Title: Re: Aria roles... important or silly?
Post by: ian on 22 Oct 2019, 06:34:28 pm
I can't argue with the pointlessness of it now, but it seems to me that it was developed while all else was up in the air.

IMO W3C foresaw many of the problems we faced / are still facing getting people to understand that the devices of the future will be of differing sizes and capabilities.

The problem with predicting the future is that you can't, but sometimes you do get it right and make a lucky call:
Quote
I think there is a world market for maybe five computers.
Thomas Watson, president of IBM