[Webkit-unassigned] [Bug 245299] getAttribute('aria-activedescendant') should return null when the assigned node has moved to a shadow tree

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 00:20:44 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=245299

--- Comment #3 from Manuel Rego Casasnovas <rego at igalia.com> ---
There's a test case in the WPT test that checks this:
https://github.com/web-platform-tests/wpt/blob/master/html/dom/aria-element-reflection.html#L231

The test moves an element to the Shadow DOM then checks that ariaActiveDescendantElement is null.

Checking the spec (https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes) this is null because of this text:
"
  1. If element's explicitly set attr-element is not null:

     * If element's explicitly set attr-element is a descendant of any of element's shadow-including ancestors, then return element's explicitly set attr-element.

     * Otherwise, return null.
"

The first condition is not met, so it returns null.

But the test case explicitly checks that the attribute is still kept with the original value.
Should the fact that an element has been moved into a shadow tree has an effect on the attributes of another element?

Is the test case right or wrong?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220921/175901b1/attachment.htm>


More information about the webkit-unassigned mailing list