accname icon indicating copy to clipboard operation
accname copied to clipboard

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

Open cookiecrook opened this issue 2 years ago • 6 comments

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

cookiecrook avatar Oct 13 '23 23:10 cookiecrook

Maybe add "aria-hidden project"?

spectranaut avatar Oct 19 '23 17:10 spectranaut

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

cookiecrook avatar Oct 19 '23 17:10 cookiecrook

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

cookiecrook avatar Oct 19 '23 18:10 cookiecrook

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.

spectranaut avatar Nov 02 '23 18:11 spectranaut

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 avatar Nov 03 '23 21:11 cookiecrook

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

rahimabdi avatar Nov 16 '23 20:11 rahimabdi