Prepare Tkinter 9.1 screenreader support
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
Tcl/Tk adds support for screen-readers in Tk 9.1:
https://www.tcl-lang.org/software/tcltk/9.1.html
The related TIP 733 can be found here:
https://core.tcl-lang.org/tips/doc/trunk/tip/733.md
The C-Api documentation is provided at least here:
https://github.com/tcltk/tk/blob/main/doc/accessible.n
And the actual implementation is here:
https://github.com/tcltk/tk/blob/main/generic/tkAccessibility.c
Even though default values for standard widgets will be present custom widgets drawn by a Canvas can't be foreseen and a user might wish to alternate the defaults.
https://core.tcl-lang.org/tk/tktview/1110144ae9
Since tkinter is a thin wrapper around tk the appropriated API should be something like this:
def accessible(window, **kwargs):
sub = [
'role', 'name', 'description', 'value',
'state', 'action', 'help string'
]
parse = ()
for cmd in sub:
if val:= kwargs.pop(cmd, None):
parse = parse + (cmd, val)
if kwargs:
raise ValueError
window._tk.call('accessible', str(window), *parse)
Might best be placed into Misc.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
- gh-153246
- gh-153247
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read TIP 733, Tk's accessible.n C-API documentation, and generic/tkAccessibility.c to understand the Tk 9.1 interface. Compare the proposed direction with linked PRs gh-153246 and gh-153247, then confirm the appropriate Tkinter API location, possibly Misc; done means custom Canvas widgets can provide or override accessibility values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- accessibility, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100