AX: The isolated tree doesn't update in response to HTMLOptionElement::setSelectedState changes
<rdar://problem/100839849>
Created attachment 462829 [details] Patch
(In reply to Tyler Wilcock from comment #2) > Created attachment 462829 [details] > Patch --- a/Source/WebCore/accessibility/AXObjectCache.cpp +++ a/Source/WebCore/accessibility/AXObjectCache.cpp +bool isARIATableCell(Node* node) Make it a static function like isSimpleImage. --- a/Source/WebCore/accessibility/AXObjectCache.h +++ a/Source/WebCore/accessibility/AXObjectCache.h + void selectedStateChanged(Node*); Rename to onSelectedStateChange. --- a/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm +++ a/Source/WebCore/accessibility/ios/AXObjectCacheIOS.mm - if (notificationName.isNull()) + if (notificationName.isNull() || (notificationName == SelectedCellsChangedNotificationName && !isARIATableCell(object->node()))) return; Why do we want to suppress this notification here? If we don't want an iOS client to react to it, we should ignore it closer to the client, maybe in the system bundle. --- a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm +++ a/Source/WebCore/accessibility/mac/AXObjectCacheMac.mm case AXSelectedStateChanged: - macNotification = NSAccessibilitySelectedCellsChangedNotification; - break; + if (isARIATableCell(object->node())) { + macNotification = NSAccessibilitySelectedCellsChangedNotification; + break; + } + return; If we want to distinguish SelectedState from SelectedCells for table cells, we should add a new AXSelectedCellsChanged, so that we shouldn't need to call isARIATableCell(object->node()) here.
Created attachment 462843 [details] Patch
Committed 255279@main (1aa25b42a5eb): <https://commits.webkit.org/255279@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 462843 [details].