-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AX: Accessibility relations become stale for objects that have a rend…
…erer attached after their creation https://bugs.webkit.org/show_bug.cgi?id=261643 rdar://problem/115604027 Reviewed by Andres Gonzalez. This patch fixes a bug initiated by this sequence: 1. We create an AX object for an element that will eventually have a renderer, but does not have it yet. This object has some relationship to another element (e.g. via aria-activedescendant) 2. Something triggers AXObjectCache::m_relations to be built. 3. The renderer is created and attached to the element. AXObjectCache::onRendererCreated(Element&) is called, removing the old AX object. m_relations still has the now-stale entry to this old AX object. With this patch, we detect this scenario and dirty relations when necessary. This bug blocked fixing accessibility/mac/grid-selected-cells.html in ITM. But a couple more changes were necessary to fully fix it: * Move AccessibilityObject::selectedCells to AXCoreObject and remove AXPropertyName::SelectedCells entirely. This obviates the need to update the property when relations change, as it is dependent on AXRelationType::ActiveDescendant. * Fix a bug where cells that dynamically change their aria-selected attribute were not updating AXPropertyName::IsSelected. With this patch, accessibility/mac/grid-selected-cells.html passes in ITM. * LayoutTests/accessibility-isolated-tree/TestExpectations: * LayoutTests/accessibility/mac/grid-selected-cells-expected.txt: * LayoutTests/accessibility/mac/grid-selected-cells.html: * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::focusedObjectForNode): (WebCore::AXObjectCache::onRendererCreated): (WebCore::AXObjectCache::handleActiveDescendantChange): (WebCore::AXObjectCache::performDeferredCacheUpdate): (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::selectedCells): Deleted. (WebCore::AccessibilityObject::activeDescendant const): Deleted. * Source/WebCore/accessibility/AccessibilityObject.h: * Source/WebCore/accessibility/AccessibilityObjectInterface.h: (WebCore::AXCoreObject::activeDescendant const): (WebCore::AXCoreObject::selectedCells): (WebCore::AXCoreObject::canHaveSelectedCells const): Deleted. * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::initializeProperties): (WebCore::AXIsolatedObject::activeDescendant const): Deleted. * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: Canonical link: https://commits.webkit.org/268122@main
- Loading branch information
1 parent
a427952
commit 7a07450
Showing
12 changed files
with
138 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
LayoutTests/accessibility/mac/grid-selected-cells-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.