Repository navigation
Conversation
… siblings Name from contents walks the element's children by taking its first child and then repeatedly the next sibling. A display: contents element has no box for its children to hang off, so the object after its last child is one of the element's own siblings, and the walk carries on into it. The check meant to stop this only did so when the next object had a display: contents parent of its own that differed, which the siblings do not have, so nothing stopped it. Ask instead whether the next object is still a child of the element we started from. Chrome and Firefox name all of the cases in the test "x". Whether the leak was visible depended on what followed in the markup, which is why the div at line 66 of css/css-display/accessibility/display-contents-role-and-label.html reported "x x x x" while the same shape with the link role a hundred lines later reported "x": the latter is followed by a display: contents list whose item did trip the old check, and the two objects it had already walked into were whitespace only. WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=321874 WebKit-Canonical-Link: https://commits.webkit.org/319287@main
wpt-pr-bot
approved these changes
Oct 25, 2026
wpt-pr-bot
left a comment
Collaborator
There was a problem hiding this comment.
The review process for this patch is being conducted in the WebKit project.
annevk
enabled auto-merge (rebase)
October 25, 2026 08:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WebKit export from bug: Accessible name of a display: contents element includes text from its siblings