WebAccessibilityObjectWrapperMac::detachIsolatedObject should not unregister the wrapper for AccessibilityDetachmentType::ElementChanged detachments
https://bugs.webkit.org/show_bug.cgi?id=240628
Reviewed by Chris Fleizach.
Prior to this change, WebAccessibilityObjectWrapperMac::detachIsolatedObject unconditionally
called NSAccessibilityUnregisterUniqueIdForUIElement. This is the wrong
behavior for AccessibilityDetachmentType::ElementChanged detachments, as
this unregistering causes an element destroyed notification to be issued.
This type of detachment happens when we swap the underlying isolated
object for a wrapper as the result of a call to AXIsolatedTree::updateNode.
This unregistering caused VoiceOver focus flickering when modifying
sliders or textboxes, greatly hampering user experience.
No test included because there isn't a great way to test this.
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper detachIsolatedObject:]):
link: https://commits.webkit.org/250805@main
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@294552 268f45cc-cd09-0410-ab3c-d52691b4dbfc