Add default ARIA role to HTMLElement technical details tables

I love that the technical details tables for all the HTML element reference pages includes permitted ARIA roles, but I think it would be a good idea to add the default role for each element as well.

I often find myself looking for this info but have to go to the ARIA in HTML spec to find it. Additionally, I feel that including this info would perhaps help to educate developers about semantics and perhaps even prevent some developers from adding inappropriate roles to elements that don’t need it.

I’d be happy to go through and start adding this info myself.

Hi @JamesCatt,

I think this is a really great idea, and would be happy for you to add it. Do you need any help to get started? As long as you have an MDN account, I think you can just go ahead and start adding this information.

I guess we should agree on what form it should take. I’ve tried adding it to the table on the <button> page:

Do you think this makes sense?

I’ve not used the {{ARIARole()}} macro call to create the link as I wanted to link to the MDN role page wherever possible; we have one for button, so it was fine in this case.

@chrisdavidmills sounds good to me. Linking to the MDN page was what I was thinking as well. I don’t think I need anything else at this point, will start working away on it.


Great stuff, thanks! Just give me a shout if you need any help at any point.

@chrisdavidmills I realized belatedly that the technically-accurate term is “implicit” ARIA role instead of “default” (because the various accessibility APIs are different and ARIA roles don’t map to them 1:1), so I’ve been updating them with that term. Hope that makes sense to you.

I’m focusing on adding the ones that have an implicit role for now, will go back and add the ones that don’t have a role afterwards.

Sounds good to me; thanks James!