w3c / accname

Accessible Name and Description Computation
https://w3c.github.io/accname/
61 stars 23 forks source link

Ambiguous but normative requirement about hidden nodes is hidden by default in AccName #211

Open cookiecrook opened 11 months ago

cookiecrook commented 11 months ago

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:

We probably just didn't notice it because it was hidden... 🤣

spectranaut commented 11 months ago

Maybe add "aria-hidden project"?

cookiecrook commented 11 months ago

I mispoke on the call. A "hidden" project would include more than just aria-hidden: inert, css visibility, display:none, content-visibility, etc.

cookiecrook commented 11 months ago

…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.

spectranaut commented 11 months ago

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:

  1. Rahim makes a test in WPT to verify whether or not this scenario is supported in the browsers
  2. 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.

cookiecrook commented 11 months ago

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.

rahimabdi commented 10 months ago

@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):