fix: a screen reader hears which sceneries lie under a group

Avalonia hung the entries under a group on the panel inside it, so NVDA counted
every scenery at level one and the tree sounded flat. An open group now gives its
entries as its own, and each entry names its group as its parent: Całkowo is
level one, calkowo_lotos under it level two.
This commit is contained in:
maj00r
2026-11-15 18:36:23 +01:00
parent 099ff3603e
commit d2b8cdf3ba
2 changed files with 39 additions and 3 deletions

View File

@@ -39,4 +39,16 @@ public class ExpandableTreeViewItemTests
peer.Collapse();
Assert.False(item.IsExpanded);
}
[Fact]
public void An_entry_on_its_own_has_nothing_under_it_and_nothing_over_it()
{
var item = new ExpandableTreeViewItem { Header = "Całkowo", IsExpanded = true };
var peer = ControlAutomationPeer.CreatePeerForElement(item);
Assert.Empty(item.ReadableChildren);
Assert.Null(item.ReadableParent);
Assert.Empty(peer.GetChildren());
Assert.Null(peer.GetParent());
}
}