Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b5fb0a03893d854f5f4c3b0085122ab4e7525a9
      
https://github.com/WebKit/WebKit/commit/2b5fb0a03893d854f5f4c3b0085122ab4e7525a9
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-01-20 (Tue, 20 Jan 2026)

  Changed paths:
    A LayoutTests/accessibility/aria-owns-id-change-expected.txt
    A LayoutTests/accessibility/aria-owns-id-change.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/accessibility/AXObjectCache.cpp

  Log Message:
  -----------
  AX: When the `id` attribute changes for an element that is the target of an 
aria-owns, the AX children of the aria-owns element are not updated
https://bugs.webkit.org/show_bug.cgi?id=255018
rdar://107644248

Reviewed by Joshua Hoffman.

When an element's id attribute changes, any aria-owns relationships
targeting that element may also change. Previously, the accessibility
tree was not being properly updated in this case, leaving owners with
stale children.

Now when an element's id changes, we find any current owner(s) via the
existing relations map (before it's rebuilt) and notify them via 
childrenChanged().

The relations map is already marked dirty via relationsNeedUpdate(true)
which is called after handleAttributeChange. When relations are rebuilt,
addRelation handles notifying new owners. This fix ensures old owners
(whose target has gone away) are also notified.

* LayoutTests/accessibility/aria-owns-id-change-expected.txt: Added.
* LayoutTests/accessibility/aria-owns-id-change.html: Added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):

Canonical link: https://commits.webkit.org/305890@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to