w3c / accname

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

Seeking clarity on name property with `div` #202

Closed howard-e closed 1 year ago

howard-e commented 1 year ago

This relates to a new wpt test being added for comp_tooltip, with https://github.com/web-platform-tests/wpt/pull/42093.

<div title="label" data-expectedlabel="label" data-testname="div with text with tooltip label" class="ex">content</div>

@cookiecrook review comment states:

This div test may be ambiguous since its role is undefined and should in theory be "", generic, or none, which don't support name from: author or contents. Adding role="group" should remove the ambiguity IIRC.

We're seeking clarity on if there is a spec ambiguity here.

cookiecrook commented 1 year ago

ARIA spec defines Name From: prohibited on both none and generic... So should new tests verify the name is empty "" (not "title" or "content")?

jnurthen commented 1 year ago

No. This is an authoring requirement not a user agent requirement. We deliberately have not made this a UA requirement to avoid breaking the web

cookiecrook commented 1 year ago

I assume that means we should just continue to not test computedlabel on generics? Howard's test has been updated to avoid that (explicitly role="group" now), so there is nothing to be done, unless we want to document this decision somewhere in the WPT repo.

cookiecrook commented 1 year ago

I'll close once I determine if there is more to do re: documenting this in the WPT source.

cookiecrook commented 1 year ago

I think we’re good without a WPT source change or comment. If ambiguities or bugs sneak back in to the tests, we can always fix them. @howard-e please merge the related test when you are ready. Thanks!