Prepare Tkinter 9.1 screenreader support
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
閱讀 TIP 733、Tk 的 accessible.n C-API 文件和 generic/tkAccessibility.c,以了解 Tk 9.1 介面。將提議的方向與連結的 PR gh-153246 和 gh-153247 進行比較,然後確認適當的 Tkinter API 位置,可能是 Misc;當自訂 Canvas 小工具能夠提供或覆寫無障礙值時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- accessibility, desktop
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100