Prepare Tkinter 9.1 screenreader support
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Leggere TIP 733, la documentazione dell’API C accessible.n di Tk e generic/tkAccessibility.c per comprendere l’interfaccia di Tk 9.1. Confrontare la direzione proposta con le PR collegati gh-153246 e gh-153247, quindi confermare la posizione appropriata dell’API Tkinter, possibilmente Misc; il lavoro è completato quando i widget Canvas personalizzati possono fornire o sovrascrivere valori di accessibilità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- accessibility, desktop
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100