Tk Source Code

View Ticket
Login
Ticket UUID: 324059e3d04cd3b0207293df60e31025a29106b9
Title: X11 accessibility: checkbuttons have role "unknown" (the role table has "Checkbox", accessibility.tcl sets "Checkbutton")
Type: Bug Version: 9.1
Submitter: anonymous Created on: 2026-10-03 17:35:31
Subsystem: (unused) Assigned To: kevin_walzer
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2026-10-17 22:53:20
Resolution: Fixed Closed By: kevin_walzer
    Closed on: 2026-10-17 22:53:20
Description:
library/accessibility.tcl gives Checkbutton and TCheckbutton the role
"Checkbutton". The Windows (win/tkWinAccessibility.c) and macOS
(macosx/tkMacOSXAccessibility.c) role tables map "Checkbutton", but the X11
table (roleMap in unix/tkUnixAccessibility.c) has only "Checkbox". So on
X11 every checkbutton is reported with role unknown, and a screen reader
cannot present it as a check box.

The attached repro.tcl on stock 9.1.0 (AT-SPI tree; "repro.tcl -names"
also prints the Tk role):

    [unknown] name='Checkbutton'  description='Enable'
    role of the checkbutton: Checkbutton

Proposed fix (03.patch): add {"Checkbutton", ATK_ROLE_CHECK_BOX} to the
table, keeping "Checkbox" for applications that set that role themselves.
With it the checkbutton is reported as [check box].

Possibly the same kind of problem, not tested: the "Dialog" role that the
Dialog <Map> binding sets is in none of the three role tables.
User Comments: kevin_walzer added on 2026-10-17 22:53:20:
Fixed and merged.

Attachments: