Prepare Tkinter 9.1 screenreader support
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Đọc TIP 733, tài liệu C-API accessible.n của Tk và generic/tkAccessibility.c để hiểu interface của Tk 9.1. So sánh hướng đề xuất với các PR được liên kết gh-153246 và gh-153247, sau đó xác nhận vị trí API Tkinter phù hợp, có thể là Misc; hoàn tất khi các widget Canvas tùy chỉnh có thể cung cấp hoặc ghi đè các giá trị trợ năng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- accessibility, desktop
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100