Tk Source Code

View Ticket
Login
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.