w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
179 stars 48 forks source link

Clarification: update definition of 'any role' #358

Open scottaohara opened 2 years ago

scottaohara commented 2 years ago

The current definition of 'any role' states:

...Any role it indicates that any role value apart from the implicit ARIA semantics role value, MAY be used.

this definition should be updated to indicate that this is not a carte blanche invitation to truly add 'any role' to an element.

For instance, we should make mention of the fact that any specified role must also follow the rules of use as outlined in the ARIA specification. e.g., <i role=gridcell> is valid per <i> allowing 'any role', BUT it would be invalid to add this role to an<i> if that element were not owned by a role=row, which that would then need to be owned by a role=grid.

scottaohara commented 2 years ago

note that #391 has added some updates to the paragraph that initially describes 'any role'.