aria-describedby was the only way in ARIA 1.0, 1.1, and 1.2 to provide an extended description, which WebKit does through AXHelp, the platform tooltip attribute that is also used to expose the title attribute when it is not used to compute the fallback label as part of accname. aria-description was added in ARIA 1.3 and implemented using AXCustomContent. This results in a few problems: 1. Long-standing bug: aria-describedby always overwrites the tooltip title in AXHelp. 2. Recent bug: if both aria-description and aria-describedby are used, two different extended descriptions are exposed, rather than aria-describedby overwriting aria-description. (Caveat below *) 3. Recent bug: aria-describedby value (as AXHelp) is spoken by default (expected) but aria-description (as AXCustomContent with default important) is not. I think the resolution should be: 1. Reconcile a single extended description from aria-describedby and aria-description giving precedent to aria-describedby. (Caveat below *) 2. Change the imortance to AXCustomContentImportanceHigh so it's spoken by default. 3. Keep the tooltip title exposed as AXHelp, unless it has already been used to computed the label (AccName fallback https://w3c.github.io/accname/#comp_tooltip ) * Caveat from above: this extended description precedence order is not actually in the AccName spec yet (which is behind the ARIA spec), but will be soon with https://github.com/w3c/accname/issues/68
<rdar://problem/108386295>
In case I missed something, review the ARIA specs for those, including aria-details since it also uses AXCustomContent. https://w3c.github.io/aria/#aria-describedby https://w3c.github.io/aria/#aria-description https://w3c.github.io/aria/#aria-details
Created attachment 466038 [details] Patch
Comment on attachment 466038 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=466038&action=review > LayoutTests/accessibility/aria-description.html:15 > +<div id="button1" role="button" aria-describedby="label1">button</div> > +<div id="label1">text</div> > + > +<div id="button2" role="button" aria-describedby="label2" aria-description="Longer description ignored">button</div> > +<div id="label2">text</div> > + Unless this is already tested in another file, how about a multi-IDREF test, too? <div id="button3" role="button" aria-describedby="label3 label4" aria-description="this description ignored">button</div> <div id="label4">concatenated</div> <div id="label4">description</div>
Created attachment 466242 [details] Patch
Created attachment 466245 [details] Patch
Created attachment 466251 [details] Patch
Created attachment 466255 [details] Patch
Created attachment 466257 [details] Patch
Created attachment 466260 [details] Patch
Created attachment 466264 [details] Patch
Created attachment 466265 [details] Patch
Committed 263813@main (352b951ab4a8): <https://commits.webkit.org/263813@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 466265 [details].
*** Bug 245985 has been marked as a duplicate of this bug. ***