Tk Source Code

View Ticket
Login
2026-10-17
22:54 • Closed ticket [b9d85fc1]: X11 accessibility: root accessible is not registered with ATK; does not work where atk_get_root() cannot be interposed (illumos) plus 5 other changes artifact: db39c85f user: kevin_walzer
2026-10-06
01:50 • Ticket [b9d85fc1]: 3 changes artifact: 8da41ec1 user: kevin_walzer
2026-10-05
16:13 • Ticket [b9d85fc1]: 3 changes artifact: 753de446 user: kevin_walzer
15:05 • Ticket [b9d85fc1]: 6 changes artifact: 27a5c345 user: jan.nijtmans
2026-09-25
17:15 • Ticket [b9d85fc1]: 3 changes artifact: b230af51 user: serhiy.storchaka
17:02
Fix [b9d85fc100]: X11 accessibility: root accessible is not registered with ATK. Tk defined its own global atk_get_root(), relying on symbol interposition to override the function in libatk. This does not work where libatk-bridge binds directly to libatk (illumos), so the bridge got no root object, printed "runtime check failed: (root)" and the application was not visible to assistive technologies. Set get_root, get_toolkit_name and get_toolkit_version in the AtkUtil class before initializing the bridge, as GTK does. closed check-in: df6cd07c user: serhiy.storchaka tags: atk-util-get-root
16:43 • New ticket [b9d85fc1] X11 accessibility: root accessible is not registered with ATK; does not work where atk_get_root() cannot be interposed (illumos). artifact: dcff2157 user: serhiy.storchaka

Ticket UUID: b9d85fc1005089d3b43644054aceea6b5022416a
Title: X11 accessibility: root accessible is not registered with ATK; does not work where atk_get_root() cannot be interposed (illumos)
Type: Bug Version: 9.1b1
Submitter: serhiy.storchaka Created on: 2026-09-25 16:43:38
Subsystem: 67. Unix Window Operations Assigned To: kevin_walzer
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-17 22:54:42
Resolution: Fixed Closed By: kevin_walzer
    Closed on: 2026-10-17 22:54:42
Description:

To provide its root accessible object, unix/tkUnixAccessibility.c defines its own global function atk_get_root(), relying on it to override the function of the same name in libatk when libatk-bridge calls it. This only works if symbol interposition happens. On OpenIndiana, libatk-bridge-2.0.so is linked with direct binding, so its call binds to libatk's atk_get_root() (confirmed with LD_DEBUG=bindings), which returns NULL because Tk never sets AtkUtilClass->get_root. Every wish start then prints

WARNING **: ...atk_bridge_adaptor_init: runtime check failed: (root)

and the application is not visible to assistive technologies. On Linux the interposition currently works, but it would also fail if libatk-bridge was already loaded globally by another library before Tk.

The documented way, as in GTK, is to set get_root (and get_toolkit_name/get_toolkit_version) in the AtkUtilClass obtained with g_type_class_ref(ATK_TYPE_UTIL) before calling atk_bridge_adaptor_init().

User Comments: kevin_walzer added on 2026-10-06 01:50:02:
Merged into alt_x11_accessibility_fixes. I see no adverse impact on Linux, but cannot test elsewhere.

kevin_walzer added on 2026-10-05 16:13:34:
Yes, I will review.

jan.nijtmans added on 2026-10-05 15:05:12:

Kevin, can you have a look?


serhiy.storchaka added on 2026-09-25 17:15:38:

Proposed fix in [df6cd07ca4] (branch atk-util-get-root): set get_root in the AtkUtil class before initializing the bridge, instead of defining atk_get_root().

Tested with the AT-SPI registry on OpenIndiana: without the fix no application is registered; with the fix "Tk Application" is, and the warning is gone. On Linux, where the interposition worked, the accessible tree is unchanged.