-
Notifications
You must be signed in to change notification settings - Fork 138
Description
There was a previous effort to allow certain roles to receive their accessible name from encapsulation. That work was put to the side, and a more targeted version was spun up for certain roles receiving a name from heading
Pending the success of the referenced PR, and per the discourse around #2297, it made me think it was worth opening a new issue to discuss how radiogroup, group, table and grid could also get their accName.
For instance, table and grid could look for the first instance of an element with role=caption - matching HTML's native table > caption behavior. Yes, a "caption" might include more content in it than would be expected/desired for an accName. but that's already covered in the spec.
for radiogroup or group - similarly a caption ( to make the parallel with a fieldset > legend ) could also be the role to look for to get a name for these parent/ancestor roles. Maybe we consider name from heading for these as well? But, caption could be a "safer" mechanism to do this - and thus not accidently pulling an unwanted name for a radiogroup/group, if there are already headings defined within (for better/worse).
Those are the four roles that seem like they could most benefit from automatic naming, cutting down on the need for authors to use aria-labelledby / IDs, and potentially mitigating instances of elements which should be named not receiving a name due to author's missing out on adding the association/explicitly naming.