fix: a screen reader names every control and Tab survives adding a vehicle

NVDA read icon buttons as "Material.Icons.Avalonia.MaterialIcon" and the
sceneries in the tree as nothing. Icon buttons are now named by their
tooltip, list and tree entries by the text they show, fields by the hint in
them, and the inputs of a setting row by its label. The lists, the tree and
the language and profile pickers have names, and a consist card says its
place and vehicles.

Adding a vehicle rebuilt the browser list and switched the add button off
for a moment, and focus fell out of the window: Tab did nothing until
something was clicked. Focus goes back to the button or the list, and Tab
with nothing focused starts from the first control. The splitters are no
longer Tab stops.
This commit is contained in:
maj00r
2026-11-15 17:40:51 +01:00
parent 744720d922
commit a83bb4a7eb
14 changed files with 388 additions and 9 deletions

View File

@@ -33,6 +33,7 @@
IsCheckedChanged="ArchivalSwitch_OnChanged"
Content="{Binding [HideArchivalSceneries], Source={x:Static starterNg:App.Loc}}" />
<TreeView Name="sceneryList" Classes="Compact"
AutomationProperties.Name="{Binding [Sceneries], Source={x:Static starterNg:App.Loc}}"
SelectionChanged="SceneryList_OnSelectionChanged"
ContextRequested="SceneryList_OnContextRequested">
<TreeView.ContextMenu>
@@ -49,7 +50,7 @@
</DockPanel>
</HeaderedContentControl>
<GridSplitter Grid.Column="1" Grid.Row="0" Width="6"
<GridSplitter IsTabStop="False" Grid.Column="1" Grid.Row="0" Width="6"
Background="Transparent" ResizeDirection="Columns" />
<Grid Grid.Column="2" Grid.Row="0">
@@ -70,10 +71,11 @@
</HeaderedContentControl.Tag>
<ListBox Name="vehicleList" Classes="Compact"
AutomationProperties.Name="{Binding [SceneryConsists], Source={x:Static starterNg:App.Loc}}"
SelectionChanged="VehicleList_OnSelectionChanged" />
</HeaderedContentControl>
<GridSplitter Grid.Row="1" Height="4" HorizontalAlignment="Stretch"
<GridSplitter IsTabStop="False" Grid.Row="1" Height="4" HorizontalAlignment="Stretch"
Background="Transparent" ResizeDirection="Rows" />
<TabControl Grid.Row="2" Name="infoTabs">