[Webkit-unassigned] [Bug 230258] [GTK][a11y] Add implementation of text interface when building with ATSPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 20 06:41:17 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=230258

--- Comment #3 from Andres Gonzalez <andresg_22 at apple.com> ---
(In reply to Carlos Garcia Campos from comment #2)
> Created attachment 441869 [details]
> Patch

--- a/Source/WebCore/accessibility/AXObjectCache.cpp
+++ a/Source/WebCore/accessibility/AXObjectCache.cpp

@@ -1428,9 +1428,10 @@ void AXObjectCache::postTextStateChangeNotification(const Position& position, co

     stopCachingComputedObjectAttributes();

-#if PLATFORM(COCOA)
+#if PLATFORM(COCOA) || USE(ATSPI)
     AccessibilityObject* object = getOrCreate(node);
     if (object && object->accessibilityIsIgnored()) {
+#if PLATFORM(COCOA)
         if (position.atLastEditingPositionForNode()) {
             if (AccessibilityObject* nextSibling = object->nextSiblingUnignored(1))
                 object = nextSibling;
@@ -1438,6 +1439,11 @@ void AXObjectCache::postTextStateChangeNotification(const Position& position, co
             if (AccessibilityObject* previousSibling = object->previousSiblingUnignored(1))
                 object = previousSibling;
         }
+#elif USE(ATSPI)
+        auto* parent = object->parentObjectUnignored();
+        if (is<AccessibilityObject>(parent))
+            object = downcast<AccessibilityObject>(parent);
+#endif
     }

     postTextStateChangeNotification(object, intent, selection);

Why the target should be parentObjectUnignored and not the prev/next sibling?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211020/d2f0bfdb/attachment.htm>


More information about the webkit-unassigned mailing list