Closed smhigley closed 1 year ago
Closing. Reasoning provided in the closed PR #299
@scottaohara would you mind reopening, since we discussed taking a look at this again?
re: discussion mentioned above - the reason this was re-opened is because while HTML's content model will still disallow nested interactive elements within a button element (regardless if its role was overwritten or not), in further testing there does not appear to be any negative impact from a UX pov. Additionally, even in situations where using a base button element for these roles, or if one were to include nested interactive elements - any problems found would either be issues for all users (e.g., pressing a gridcell submits a form unexpectedly) or would likely be found via other wcag related testing (automated or manual).
In the Rules of ARIA attribute usage by HTML element ,
<button>
already allows every child role of composite widgets that manage focus except for tree and grid.There are benefits in using
<button>
as a base of interaction in these widgets, such as:Those benefits also apply to
gridcell
s andtreeitem
s, so it seems like it would be valuable to add those as well.Happy to do a PR for this :)