Skip to content

Conversation

@moz-wptsync-bot
Copy link
Collaborator

  • Split GetAttrAssociatedElements() into Internals and ForBindings versions; the latter returns the shadow host(s) rather than an element inside shadow DOM
  • Use GetAttrAssociatedElementsInternal() in a11y::AssociatedElementsIterator, removing the need for AssociatedElementsIterator to directly parse IDs or distinguish between ID-based or explicitly-set attr-associated elements.
  • This required an update to DocAccessible's AddDependentIDsFor() method which previously used AssociatedElementsIterator's NextID() method, which is removed in this patch. AddDependentIDsFor() now uses the parsed attribute directly instead.
  • In order to run the WPT tests which test aria-labelledby integration with referenceTarget, a new mechanism for retrieving elements inside shadow roots is added. This adds a element_by_selector_array action, which takes an array of selectors to be used successively from a document root to retrieve a shadow host, and then within the shadow host to retrieve the next shadow host, until the final selector returns the desired element.

Differential Revision: https://phabricator.services.mozilla.com/D261366

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1981345
gecko-commit: 32733496a5effaeedff3c8d7011586e4f38be7d7
gecko-reviewers: dom-core, Jamie, smaug

- Split `GetAttrAssociatedElements()` into `Internals` and `ForBindings` versions; the latter returns the shadow host(s) rather than an element inside shadow DOM
- Use `GetAttrAssociatedElementsInternal()` in `a11y::AssociatedElementsIterator`, removing the need for `AssociatedElementsIterator` to directly parse IDs or distinguish between ID-based or explicitly-set attr-associated elements.
- This required an update to `DocAccessible`'s `AddDependentIDsFor()` method which previously used `AssociatedElementsIterator`'s `NextID()` method, which is removed in this patch. `AddDependentIDsFor()` now uses the parsed attribute directly instead.
- In order to run the WPT tests which test `aria-labelledby` integration with `referenceTarget`, a new mechanism for retrieving elements inside shadow roots is added. This adds a `element_by_selector_array` action, which takes an array of selectors to be used successively from a document root to retrieve a shadow host, and then within the shadow host to retrieve the next shadow host, until the final selector returns the desired element.

Differential Revision: https://phabricator.services.mozilla.com/D261366

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1981345
gecko-commit: 32733496a5effaeedff3c8d7011586e4f38be7d7
gecko-reviewers: dom-core, Jamie, smaug
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels Dec 24, 2025
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Firefox project.

@lutien
Copy link
Contributor

lutien commented Jan 5, 2026

Could someone from @web-platform-tests/admins force merge this PR? 🙏🏻 The infra failure in Chrome is not related to these changes, see #56985.

@Ms2ger Ms2ger merged commit 3af8623 into master Jan 5, 2026
34 of 36 checks passed
@Ms2ger Ms2ger deleted the gecko/1981345 branch January 5, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra mozilla:gecko-sync wptrunner The automated test runner, commonly called through ./wpt run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants