Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(re)Consider name from encapsulation for specific roles #2440

Open
scottaohara opened this issue Feb 18, 2025 · 0 comments
Open

(re)Consider name from encapsulation for specific roles #2440

scottaohara opened this issue Feb 18, 2025 · 0 comments
Labels

Comments

@scottaohara
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants