w3c / html-aria

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

Add treeitem and gridcell to list of allowed button roles #299

Closed smhigley closed 3 years ago

smhigley commented 3 years ago

Resolves #298

Adds gridcell and treeitem to the list of allowed button roles, so that it can be used as a base within all compound focus-managing widget roles.


Preview | Diff

scottaohara commented 3 years ago

hey @smhigley.

Right now we're holding on accepting PRs as we finish the implementation report / go through wide review. But I think this is definitely worth looking at. thank you

scottaohara commented 3 years ago

unfortunately after giving this some more thought / talking with Sarah about this, it turns out updating to allow these roles wouldn't really work out. For instance, both a gridcell and treeitem would allow for nested elements – a treeitem in particular could have an entire nested tree within, where as a gridcell could have nested links, buttons, etc.. But HTML's button element does not allow for the nesting of interactive elements, and the native behavior of the <button> would likely cause issues if interactive elements were nested.