Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Windows: expose a heading's level as UIA HeadingLevel

オープン
#840 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
76/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
accessibility

調査の方向性

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:

  1. A heading_level(&self) -> Option<i32> method next to level(). It returns HeadingLevel1.0 + level - 1 when the role is Role::Heading and level() is in 1..=9, and None otherwise. With None, UIA keeps its default, HeadingLevel_None, which matches Chromium for non-headings and out-of-range levels.
  2. A (UIA_HeadingLevelPropertyId, heading_level) entry in the property table, after (UIA_LevelPropertyId, level).
  3. A test in adapters/windows/src/tests/ built like simple.rs. It reads the property through IUIAutomation for 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AccessKit/accesskit のほかの issue

AccessKit/accesskit の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。