Windows: expose a heading's level as UIA HeadingLevel
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- accessibility
Hướng nghiên cứu
Start with adapters/windows/src/node.rs, especially level() and the UIA property table, then read a nearby test in adapters/windows/src/tests/simple.rs. Add coverage for a level-2 heading, a level-12 heading, and a label by reading UIA_HeadingLevelPropertyId through IUIAutomation; done means they report HeadingLevel2, HeadingLevel_None, and HeadingLevel_None respectively, with the Windows test passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Platform: Windows (UI Automation). Version: accesskit_windows 0.34.0 through current main.
Problem
The Windows adapter gives a heading's level to UIA only as UIA_LevelPropertyId and as level= in UIA_AriaPropertiesPropertyId. It never sets UIA_HeadingLevelPropertyId (30173), so every heading reports the default, HeadingLevel_None.
Narrator's heading navigation (scan mode H / Shift+H and the headings list) goes by HeadingLevel. So AccessKit headings are announced as "heading", but Narrator can't move to them or list them.
To reproduce, put a Node::new(Role::Heading) with set_label("Inbox") and set_level(2) in any tree, then read UIA_HeadingLevelPropertyId on it with a UIA client. You get HeadingLevel_None (80050) where you'd expect HeadingLevel2 (80052).
What Chromium does
AXPlatformNodeWin::GetPropertyValueImpl answers UIA_HeadingLevelPropertyId with AXHierarchicalLevelToUIAHeadingLevel(role, hierarchical_level) (ui/accessibility/platform/ax_platform_node_win.cc). For a heading with level 1 to 9 that returns HeadingLevel1 + level - 1. For anything else, including a level above 9 (UIA has no enum value for those), it returns HeadingLevel_None.
Proposed implementation
Only adapters/windows/src/node.rs changes:
- A
heading_level(&self) -> Option<i32>method next tolevel(). It returnsHeadingLevel1.0 + level - 1when the role isRole::Headingandlevel()is in1..=9, andNoneotherwise. WithNone, UIA keeps its default,HeadingLevel_None, which matches Chromium for non-headings and out-of-range levels. - A
(UIA_HeadingLevelPropertyId, heading_level)entry in the property table, after(UIA_LevelPropertyId, level). - A test in
adapters/windows/src/tests/built likesimple.rs. It reads the property throughIUIAutomationfor a level-2 heading (HeadingLevel2), a level-12 heading (HeadingLevel_None) and a label (HeadingLevel_None).
The other adapters don't need anything from this. macOS headings are covered separately in #830.
We carry exactly this change as a local patch on 0.34.0, and the test above passes on Windows CI. I can share the diff if that helps.
This issue was drafted with the help of an AI assistant. The behaviour and the Chromium reference were checked against the sources.
- Ngôn ngữ chính
- Rust
- Star
- 1.5k
- Fork
- 127
- Merge trung bình
- 16 giờ 44 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của AccessKit/accesskit
-
Document sub-treesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Document `Role::ColorWell`Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 32/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AccessKit/accesskit
Issue tương tự
-
A-UI C-Bug S-Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bevyengine/bevy#26330 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Update releases hashes in READMEĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
chipsalliance/caliptra-sw#4335 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
aaif-goose/goose#13158 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent enhancement provider:anthropic providers triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
can1357/oh-my-pi#17148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`invalid_regex` example is wrongĐang mởA-documentation good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
rust-lang/rust-clippy#17926 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày