[Webkit-unassigned] [Bug 230259] [GTK][a11y] Add initial WTR accessibility support when building with ATSPI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 28 01:51:16 PDT 2021


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

--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Andres Gonzalez from comment #2)
> (In reply to Carlos Garcia Campos from comment #1)
> > Created attachment 442353 [details]
> > Patch
> 
> --- a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
> +++ a/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
> @@ -246,7 +246,11 @@ void* WKAccessibilityRootObject(WKBundlePageRef pageRef)
>  #if ENABLE(ACCESSIBILITY)
>      if (!pageRef)
>          return 0;
> -
> +
> +#if USE(ATSPI)
> +    return WebKit::toImpl(pageRef)->accessibilityRootObject().child();
> +#endif
> 
> Why the root obtained down below doesn't work for ATSPI?
> 
>     WebCore::AXCoreObject* root =
> core.document()->axObjectCache()->rootObject();
>     if (!root)
>         return 0;
>     
>     return root->wrapper();

In the web process the web page has an accessibility object that is the parent of the root object. In case of ATK that's WebKitWebPageAccessibilityObject, in atspi it's WebCore::AccessibilityRootAtspi. When running layout tests we don't really need a parent for the root object, but in atspi WebCore::AccessibilityRootAtspi contains the AccessibilityAtspi object that implements the communication with atspi service. So, all wrappers expect to have a valid root that they use to talk to atspi service. In case of ATK, when tests are run the web page accessibility object is never connected to the root object wrapper, but in atspi we need to make that connection that happens in AccessibilityRootAtspi::child(). That's why we get the root object wrapper as the child of the web page accessibility object (the root of the tree in the web process).

-- 
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/20211028/10fe53ff/attachment-0001.htm>


More information about the webkit-unassigned mailing list