NEW 262751
AX: WebKit adds additional space to inline elements when computing the label of an ancestor
https://bugs.webkit.org/show_bug.cgi?id=262751
Summary AX: WebKit adds additional space to inline elements when computing the label ...
James Craig
Reported 2023-10-05 17:27:38 PDT
# Background: As part of https://github.com/web-platform-tests/wpt/pull/42354 I noticed WebKit behaved differently than Gecko and Chromium. See last three failures https://wpt.fyi/results/accname/name/comp_name_from_content.html?diff&filter=ADC&run_id=6197887781830656&run_id=6282535614545920 Search for "button name from content for each child (no space, inline)" if you're unsure which tests... WebKit is technically the only one to implement that portion of the AccName spec as written today, so I raised this issuse for the ARIA WG. https://github.com/w3c/accname/issues/205 WG Resolution was that the spec is wrong, and will be shifting to match the behavior in Gecko and Chromium. I generally agree with the decision and think WebKit should also shift in anticipation of this spec change, and to match the other implementations. The PR hasn't landed yet, but when it does, those tests will be the last three in: https://github.com/web-platform-tests/wpt/blob/master/accname/name/comp_name_from_content.html # Change Needed: When a role supporting "name from content" has `display:inline` descendants with no inter-element whitespace, the AccName algorithm should not add the additional whitespace joiner. <h1>simple w/ for each child (w/o spaces and display:inline)</h1> <button data-expectedlabel="onetwothree"><span>one</span><span>two</span><span>three</span></button><br> <h3 data-expectedlabel="onetwothree"><span>one</span><span>two</span><span>three</span></h3> <a href="#" data-expectedlabel="onetwothree"><span>one</span><span>two</span><span>three</span></a><br> <br> But make sure we don't regress the tests that immediately follow that one, because those elements don't use an inline display. <h1>simple w/ for each child (w/o spaces and display:block)</h1> <button data-expectedlabel="one two three" style="display:block;"><span>one</span><span>two</span><span>three</span></button><br> <h3 data-expectedlabel="one two three" style="display:block;"><span>one</span><span>two</span><span>three</span></h3> <a href="#" data-expectedlabel="one two three" style="display:block;"><span>one</span><span>two</span><span>three</span></a><br> <br> <h1>simple w/ for each child (w/o spaces and display:inline block)</h1> <button data-expectedlabel="one two three" style="display:inline-block;"><span>one</span><span>two</span><span>three</span></button><br> <h3 data-expectedlabel="one two three" style="display:inline-block;"><span>one</span><span>two</span><span>three</span></h3> <a href="#" data-expectedlabel="one two three" style="display:inline-block;"><span>one</span><span>two</span><span>three</span></a><br> <br>
Attachments
Radar WebKit Bug Importer
Comment 1 2023-10-05 17:28:16 PDT
James Craig
Comment 2 2023-10-05 17:29:45 PDT
Unfortunately since this isn't in the spec yet, the behavior may be subject to change. See the AccName "Whitespace" project for updates: https://github.com/w3c/accname/projects/1#card-42288231
James Craig
Comment 3 2023-10-06 14:55:02 PDT
Note You need to log in before you can comment on or make changes to this bug.