Ambiguous but normative requirement about hidden nodes is hidden by default in AccName
Follow-on from #209.
If you expand the "Comment" details/summary disclosure in comp_labelledby, there is a hidden (ironic?) RFC-2119 requirement:
The result of LabelledBy Recursion in combination with Hidden Not Referenced means that user agents MUST include all nodes in the subtree as part of the accessible name or accessible description, when the node referenced by aria-labelledby or aria-describedby is hidden.
I would first suggest that it's a bad idea to hide normative requirements by default.
Second, I'm not sure what this normative requirement means. "MUST include all nodes" seems like it's requiring all the "if hidden" considerations in the algorithm to be ignored, and all DOM subtree text must be included in the accessible name. But that can't be right.
I think this requirement might be contradictory to the more recent momentum around hidden:
- https://github.com/w3c/accname/issues/30
- https://github.com/w3c/accname/pull/150
- https://github.com/w3c/accname/issues/146
We probably just didn't notice it because it was hidden... 🤣
Maybe add "aria-hidden project"?
I mispoke on the call. A "hidden" project would include more than just aria-hidden: inert, css visibility, display:none, content-visibility, etc.
…but the issues span across various specs: html (main spec), html-aam, css, aria, accname, etc. I'm not sure we can make a project in the aria repo that cross-references non-aria-spec issues.
Discussed in today's meeting: https://www.w3.org/2023/11/02-aria-minutes.html#t09
Missed some of the discussion in the meeting, but the next steps (as I understand them) are:
- Rahim makes a test in WPT to verify whether or not this scenario is supported in the browsers
- If it is supported only in one or no browsers, then open a PR to remove this note.
Separately, @jnurthen will open an editorial PR to take notes out of the summary details format.
FWIW, I think it's okay to have extended notes and examples in a collapsed details. My concern was the buried normative requirement in a collapsed details.
@cookiecrook @jnurthen @spectranaut Following up on this:
Rahim makes a test in WPT to verify whether or not this scenario is supported in the browsers
Done, here is the WPT test PR: https://github.com/web-platform-tests/wpt/pull/43043.
If it is supported only in one or no browsers, then open a PR to remove this note.
It looks like the current accName 2B note for labelledby, as written, is broadly implemented across browsers (except for some WebKit visibility:hidden/visibility:collapse bugs):