Windows: expose a heading's level as UIA HeadingLevel
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- accessibility
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 1.5k
- Fork
- 127
- Merge medio
- 16h 44m
- PR unite (30g)
- 12
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AccessKit/accesskit
-
Document sub-treesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Document `Role::ColorWell`Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 32/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AccessKit/accesskit
Issue simili
-
accounts bug decoding
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
wboayue/rust-ibapi#1088 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`mise doctor` Shows Not Installed Lazy Tools as ProblemsForse già presa @jdx l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
area:kernel needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bherbruck/solvecraft#7179 · 1 commento ·
-
priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
storytold/photocraft#9704 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno