Bug 227528 - [GTK] Support a11y with GTK 4
Summary: [GTK] Support a11y with GTK 4
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Blocks: GTK4
  Show dependency treegraph
Reported: 2021-06-30 07:53 PDT by Michael Catanzaro
Modified: 2023-02-03 06:16 PST (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2021-06-30 07:53:48 PDT
Currently GTK 4 has no support for a11y. We should start by documenting what would be required to make this work.
Comment 1 Radar WebKit Bug Importer 2021-06-30 07:53:58 PDT
Comment 2 Carlos Garcia Campos 2021-07-01 06:23:16 PDT
What we currently have is a an a11y tree in the UI process built by GTK until WebKitWebView. The web view has is own accessible derived from AtkSocket. In the web process we have another a11y tree, coming from the DOM, so not associated to any GTK widget and it's built by WebKit using ATK API. The root of web process a11y tree is an AtkPlug. So, we use the ATK Socket/Plug API to connect the UI process tree with the web process one.

In GTK4 most of the a11y APIs are private, internally implemented by GtkWidgets, so our WebKitWebView has a GtkAtContext by default. We need a way to override the WebKitWebView a11y implementation, or at least some of the methods. For example GetChildren returns the references to the widgets that are children of WebKitWebView, but we need to include there the root object of the DOM a11y tree. Ideally, I think it should be enough if we could override GetChildren and GetChildAtIndex methods and ChildCount property somehow. Then we would need a way to get the WebKitWebView a11y object path, so that the root of DOM a11y tree can set the Parent property accordingly.
Comment 3 Michael Catanzaro 2022-05-06 12:14:22 PDT
Is this fixed?
Comment 4 Carlos Garcia Campos 2022-05-07 01:01:20 PDT
No, we still need a way to override the WebKitWebView a11y implementation. See comment #2
Comment 5 Michael Catanzaro 2022-08-08 08:36:53 PDT
This depends on: https://gitlab.gnome.org/GNOME/gtk/-/issues/3597
Comment 6 Michael Catanzaro 2022-09-14 13:54:44 PDT
Looks like https://gitlab.gnome.org/GNOME/gtk/-/issues/5162 will provide a path forward here.
Comment 7 Alice Mikhaylenko 2023-02-03 05:43:45 PST
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5470 is in now, so we should be able to have it. 🎉
Comment 8 Alice Mikhaylenko 2023-02-03 05:51:10 PST
Update: it doesn't seem to be enough for anything except entries. :(
Comment 9 Alice Mikhaylenko 2023-02-03 05:57:12 PST
Nevermind, should be fine.
Comment 10 Carlos Garcia Campos 2023-02-03 06:16:27 PST
It's not enough for our case that dom a11y tree is in a different process. See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5032#note_1638061