[wpt-sync] Sync PR 65082 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330461
Categories
(Core :: Disability Access APIs, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 65082 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/65082
Details from upstream follow.
Anne van Kesteren <annevk@annevk.nl> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=330461
WebKit export from bug: AX:<!----> name from content of a display:<!----> contents element stops at its first child in a separate box
<pre>
AX: name from content of a display: contents element stops at its first child in a separate boxAccessibilityObject::iterator walks the children of a display: contents element
from its first child in the node tree, but then takes the next sibling of each
object, which for a rendered child is its next sibling in the render tree.
Children that render in separate boxes, like text next to a block or the items
of a flex container, are not siblings there, so the walk ended at the first such
box. For instance, a <div role=button style="display: contents"> with
"x <span>y</span>" in a flex container was named "x". The node tree is also not
the composed tree that the accessibility tree is built from, so a display:
contents shadow host was named from its light tree rather than its shadow tree.So walk the children of a display: contents element in the composed tree,
skipping those without an accessibility object. The check from
<a href="https://commits.webkit.org/319287@main">319287@main</a> then only stops the walk at a child that another element owns.
The iterator keeps its position in the composed tree, as finding a node among
the assigned nodes of a slot takes linear time. It moves to AXChildIterator.h,
so that only the files that walk children include ComposedTreeIterator.h.previousSibling() and nextSibling() stay as they are. The iterator no longer
uses them for the children of a display: contents element, and their render
tree steps are what lets a rendered ancestor walk the children of a display:
contents descendant as its own, as in <a href="https://commits.webkit.org/282289@main">282289@main</a>. Following the composed tree
for all objects without a renderer, such as a hidden aria-labelledby target
that is a shadow host, is left for a follow-up.Also remove the unused lastChild(), and write the operator-- of
ComposedTreeChildAdapter::Iterator like its operator++, without a static_cast.On the GLib ports, the parent of a node object is its parent in the node tree,
so the walk stops at a slot there, and two of the shadow host cases fail.accessibility/slot-aria-labelledby.html expected a slot whose assigned nodes are
only whitespace or hidden to give the fallback content of the slot, which does
not render then. Its third and fifth cases now have no whitespace in the host,
so that they still use fallback content, and the fourth expects the own name of
the button.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=330461">https://bugs.webkit.org/show_bug.cgi?id=330461</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/326427@main">https://commits.webkit.org/326427@main</a>
</pre>
| Assignee | ||
Updated•10 days ago
|
| Assignee | ||
Comment 1•10 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=123090
| Assignee | ||
Comment 2•10 days ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 13 subtests
Status Summary
Firefox
OK : 1
PASS: 13
Chrome
OK : 1
PASS: 13
Safari
OK : 1
PASS: 4
FAIL: 9
Links
Comment 4•8 days ago
|
||
| bugherder | ||
Description
•