[webkit-changes] [WebKit/WebKit] d096a5: AX: AccessibilityController::addNotificationListen...

AndresGonzalezApple noreply at github.com
Wed Oct 25 19:43:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d096a5f0a52e23cacff9767a14b77eca1932cadc
      https://github.com/WebKit/WebKit/commit/d096a5f0a52e23cacff9767a14b77eca1932cadc
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
    M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm

  Log Message:
  -----------
  AX: AccessibilityController::addNotificationListener fails to properly install a listener if rootElement() has not been called.
https://bugs.webkit.org/show_bug.cgi?id=263678
<rdar://problem/117488670>

Reviewed by Tyler Wilcock.

The problem happens because addNotificationListener does not call AXObjectCache::accessibilityEnable, unlike rootElement and focusedElement. So if a test tries to install an AX notification listener before calling either rootElement or focusedElement, the callback function will never be called because accessibility hasn't been enabled. Many tests worked around this bug by calling either rootElement or focusedElement directly or through accessibleElementById before installing a listener. This patch fixes the problem by properly enabling accessibility when an AX notification listener is installed.

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityEnable):
* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler setCallback:]):

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




More information about the webkit-changes mailing list