w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
639 stars 123 forks source link

Consider prefixing abstract role names (e.g. `abstract-composite`) to decrease likelihood that they'll be used by authors #1345

Open cookiecrook opened 3 years ago

cookiecrook commented 3 years ago

Consider prefixing abstract role names (e.g. abstract-composite) to decrease likelihood that they'll be used by authors.

The only implementation is that validation checkers would need to update the list for warnings. I don't believe there would be any UA implementation cost.

cookiecrook commented 3 years ago

@jnurthen requested 1.3 milestone

WilcoFiers commented 3 years ago

That seems like a rather substantial change. How would that work, would the role without "abstract-" be deprecated and everything else now inherit from these new roles? I'm not a fan of this idea. The real question is why people might be using an abstract role. @cookiecrook what roles do you see folks use?

I suspect that the main reason people are using abstract roles is because they just guessed that there would be a role called "select" or "input" and threw that in without checking. Not that someone actually looked up the input role and didn't realise it was abstract. I think that's something we can test. If the type of abstract role folks are using tends towards known HTML element names, adding "abstract-" in front of it won't make a difference. But if if use of things like "command" and "landmark" is just as common as "input" and "select", you're probably right that this will help.

cookiecrook commented 3 years ago

would the role without "abstract-" be deprecated

I don’t think we’d even need to deprecate them, since they aren’t used outside of the spec or validators. It could be formal deprecation, or just a name change.

I'm not a fan of this idea.

It seemed to meet with broad support when I suggested it in the ARIA meeting.

The real question is why people might be using an abstract role. what roles do you see folks use?

Some results from a while back: https://discuss.httparchive.org/t/usage-of-aria-attributes/778

cookiecrook commented 3 years ago

I am going to let @jnurthen or other APG folks answer the justification question . I suggested the change and agreed to file the bug, but I don’t have a really strong opinion about this one.