Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0aca7bdaf628ee0b9ddf5d444df66f14e3dbd515
      
https://github.com/WebKit/WebKit/commit/0aca7bdaf628ee0b9ddf5d444df66f14e3dbd515
  Author: Tyler Wilcock <[email protected]>
  Date:   2025-02-22 (Sat, 22 Feb 2025)

  Changed paths:
    A LayoutTests/accessibility/mac/dynamic-empty-group-expected.txt
    A LayoutTests/accessibility/mac/dynamic-empty-group.html
    M Source/WebCore/accessibility/AXCoreObject.cpp
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: After dynamic page changes, WebKit can report the wrong AXEmptyGroup 
subrole state to assistive technologies
https://bugs.webkit.org/show_bug.cgi?id=288215
rdar://145306055

Reviewed by Chris Fleizach.

We cache AXProperty::SubrolePlatformString, but never update it after dynamic 
page changes, meaning we can return
a stale value when considering AXEmptyGroup, which is dependent on whether an 
object has unignored children.

This was never a problem prior to ENABLE(INCLUDE_IGNORED_IN_CORE_TREE), as 
anytime an object's unignored chlidren changed,
we created a whole new node change for it. But with this feature, we no longer 
do that, since each object's unignored
children is dependent on arbitrary layers of descendants underneath it.

Fix this by computing isEmptyGroup lazily off the main-thread, ensuring we 
never use stale information.

* LayoutTests/accessibility/mac/dynamic-empty-group-expected.txt: Added.
* LayoutTests/accessibility/mac/dynamic-empty-group.html: Added.
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::isValidChildForTable):
(WebCore::AXCoreObject::unignoredChildren):
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::onlyAddsUnignoredChildren const):
* Source/WebCore/accessibility/AXSearchManager.cpp:
(WebCore::appendChildrenToArray):
* Source/WebCore/accessibility/cocoa/AXCoreObjectCocoa.mm:
(WebCore::renderWidgetChildren):
(WebCore::AXCoreObject::isEmptyGroup):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AccessibilityObject::subrolePlatformString const):
(WebCore::isEmptyGroup): Deleted.
(WebCore::renderWidgetChildren): Deleted.
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(subroleString):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to