Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b9e9405cc26a7ec5554213b6d5fd31e19ace23ac
      
https://github.com/WebKit/WebKit/commit/b9e9405cc26a7ec5554213b6d5fd31e19ace23ac
  Author: Andres Gonzalez <[email protected]>
  Date:   2026-02-25 (Wed, 25 Feb 2026)

  Changed paths:
    M Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm

  Log Message:
  -----------
  AX: Ensure that the accessibility tree is created when adding a notification 
listener.
https://bugs.webkit.org/show_bug.cgi?id=308647
<rdar://problem/171173160>

Reviewed by Tyler Wilcock (OOPS\!).

When a layout test calls `addNotificationListener` to observe accessibility
notifications, it's possible that the accessibility tree hasn't been built
yet. If the tree doesn't exist, notifications like AXLoadComplete are never
posted, causing tests that wait for those notifications to time out.

Fix this by calling `_WKAccessibilityRootObjectForTesting` at the start of
`addNotificationListener` on both macOS and iOS. This forces the
accessibility tree to be created (if it hasn't been already) before we
begin observing, ensuring that subsequent accessibility events are properly
dispatched.

* Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::AccessibilityController::addNotificationListener):
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::addNotificationListener):

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



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

Reply via email to