Skip to main content

tk-uia

tests License: MIT Ruff

Make Tkinter applications readable by Windows screen readers and UI Automation.

Tk 8.6 exposes widgets to Windows accessibility with no names and mostly wrong control types: buttons are unnamed, labels read as images, and every themed ttk widget is an anonymous pane. tk_uia.enable(root) annotates each widget through MSAA, so screen readers such as NVDA, and UIA tools such as Inspect.exe or pytest-uia, see named, correctly typed controls instead. No runtime dependencies, no C extension, no visible change to the window.

Install

Not on PyPI yet (RELEASING.md has the plan). Install from a clone:

git clone https://github.com/HuzPro/tk-uia
cd tk-uia
pip install -e .

Windows only. On other platforms enable() returns UNSUPPORTED and does nothing, so cross-platform code can call it unconditionally.

Usage

import tkinter as tk
import tk_uia

root = tk.Tk()
root.title("Tasks")
tk.Label(root, text="Task list").pack()
tk.Button(root, text="New Task", command=create).pack()

tk_uia.enable(root)
root.mainloop()
Widget Bare Tk After enable()
tk.Button(text="New Task") ButtonControl, no name ButtonControl, Name='New Task'
tk.Label(text="Task list") ImageControl, no name TextControl, Name='Task list'
tk.Checkbutton(text="Done") ButtonControl, no name CheckBoxControl, live ToggleState
tk.Entry(textvariable=var) PaneControl, no ValuePattern EditControl, value follows the variable

Measured from a separate process. COVERAGE.md has the table for every widget class in both toolkits. COOKBOOK.md builds a real form end to end.

Features

  • One call covers the whole application, including windows opened later.
  • Names inferred from -text, correct control types for classic tk and ttk.
  • A declared textvariable is followed automatically: the name or value stays current with no further code.
  • label_for(label, entry) records which caption names which field. infer_names_from_layout(root) retrofits an existing dialog in one call and reports every name it chose.
  • describe(root) prints an audit of what a client gets and what is missing, with a reason and a fix per widget. Usable as data for CI gating.
  • Notebook tabs become real, clickable tab controls.
  • Detects Tk 9.1's native accessibility (TIP 733) and stands down.

Limitations

  • In-process only. You can annotate your own application, not someone else's.
  • InvokePattern on a Tk button does nothing; assistive technology and test tools must click. See the guide.
  • Listbox rows and Treeview items are not exposed. Notebook tabs are.
  • Verified against the UI Automation tree, which is what screen readers consume. Not yet verified against NVDA speech output; that is the top roadmap item.

Documentation

COOKBOOK.md Your first accessible form, in ten minutes.
docs/GUIDE.md Full API, how it works, every caveat and measurement.
COVERAGE.md Every widget class, measured bare and after enable().
ROADMAP.md What is next and what is out of scope.
CHANGELOG.md Release history.

License

MIT

Release files for tk-uia 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tk-uia 0.6.3
File Size Uploaded
tk_uia-0.6.3.tar.gz 144.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tk-uia 0.6.3
File Interpreter ABI Platform
tk_uia-0.6.3-py3-none-any.whl Python 3 none any Details

Total release size: 185.1 kB

Release files / tk_uia-0.6.3.tar.gz

Download URL tk_uia-0.6.3.tar.gz
Size 144.8 kB
Tags Source
SHA-256 checksum
How to use checksums
db6aaa02d6799504a9e27625f152ccb257546021ff91263780e19c29f14c817a
BLAKE2b-256 checksum
How to use checksums
502352a5fb0503f0eabc922f9df7b25540e7738bc1e0e9b7387653ecdd65871d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / tk_uia-0.6.3-py3-none-any.whl

Download URL tk_uia-0.6.3-py3-none-any.whl
Size 40.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e69a34be95d1b2b69be61f158e7533ccaa671a26c65a2e3f7e4e3b6348c4d3f
BLAKE2b-256 checksum
How to use checksums
d48f35f1e0920784909147bc3408a32cdf1019ccebf6594f5696aea32a058f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.0

2 release files

0.7.0

2 release files

This release

0.6.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page