Windows: expose a heading's level as UIA HeadingLevel
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 1.5k
- フォーク
- 127
- 平均マージ
- 16時間 44分
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AccessKit/accesskit のほかの issue
-
Document sub-treesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 1〜2日 初心者へのやさしさ 32/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
AccessKit/accesskit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
C-bug needs-triage O-UEFI T-libs
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug priority: P3 ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
shep-pm/shep-kelpie#1332 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
ramensoftware/windhawk#1156 · コメント 2 件 ·
-
area/cli complexity:trivial good first issue Stellar Wave test
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Externalize-Labs/externalize#23 ·
メンテナーはふだん 1 日以内に返信