fix(app): short accessible names for the rail and archive-year toggles

Both icon-only buttons used their tooltip sentence as their name. They now
read "Collapse navigation" / "Expand navigation" (Shell.Nav.Collapse,
Shell.Nav.Expand) and "Hide year" / "Show year" (Archive.Tree.Collapse,
Archive.Tree.Expand); the sentences stay their tooltips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-06 21:10:45 +00:00
1 parent d3af89fc27
commit 1f0adc76bb
10 files changed
+22 -2

No files matched your search

+2
View File
@@ -191,6 +191,8 @@
<data name="Archive.Toolbar.Rebuild" xml:space="preserve"><value>Rebuild index…</value></data>
<data name="Archive.Toolbar.Scan" xml:space="preserve"><value>Scan</value></data>
<data name="Archive.Toolbar.Verify" xml:space="preserve"><value>Verify</value></data>
<data name="Archive.Tree.Collapse" xml:space="preserve"><value>Hide year</value></data>
<data name="Archive.Tree.Expand" xml:space="preserve"><value>Show year</value></data>
<data name="Archive.Tree.Name" xml:space="preserve"><value>Archive tree</value></data>
<data name="Archive.Tree.Undated" xml:space="preserve"><value>Undated</value></data>
<data name="Archive.View.Health" xml:space="preserve"><value>Health</value></data>
+2
View File
@@ -12,6 +12,8 @@
<data name="Shell.JobBar.Ready.other" xml:space="preserve"><value>Ready · {0} jobs queued</value><comment>{0} count</comment></data>
<data name="Shell.Nav.About" xml:space="preserve"><value>About</value></data>
<data name="Shell.Nav.Archive" xml:space="preserve"><value>Archive</value></data>
<data name="Shell.Nav.Collapse" xml:space="preserve"><value>Collapse navigation</value></data>
<data name="Shell.Nav.Expand" xml:space="preserve"><value>Expand navigation</value></data>
<data name="Shell.Nav.Import" xml:space="preserve"><value>Import</value></data>
<data name="Shell.Nav.Jobs" xml:space="preserve"><value>Jobs</value></data>
<data name="Shell.Nav.Library" xml:space="preserve"><value>Library</value></data>
+2
View File
@@ -185,6 +185,8 @@
<data name="Archive.Toolbar.Rebuild" xml:space="preserve"><value>Ricostruisci indice…</value></data>
<data name="Archive.Toolbar.Scan" xml:space="preserve"><value>Scansiona</value></data>
<data name="Archive.Toolbar.Verify" xml:space="preserve"><value>Verifica</value></data>
<data name="Archive.Tree.Collapse" xml:space="preserve"><value>Nascondi anno</value></data>
<data name="Archive.Tree.Expand" xml:space="preserve"><value>Mostra anno</value></data>
<data name="Archive.Tree.Name" xml:space="preserve"><value>Albero dell'archivio</value></data>
<data name="Archive.Tree.Undated" xml:space="preserve"><value>Senza data</value></data>
<data name="Archive.View.Health" xml:space="preserve"><value>Stato</value></data>
+2
View File
@@ -11,6 +11,8 @@
<data name="Shell.JobBar.Ready.other" xml:space="preserve"><value>Pronto · {0} attività in coda</value></data>
<data name="Shell.Nav.About" xml:space="preserve"><value>Informazioni</value></data>
<data name="Shell.Nav.Archive" xml:space="preserve"><value>Archivio</value></data>
<data name="Shell.Nav.Collapse" xml:space="preserve"><value>Riduci navigazione</value></data>
<data name="Shell.Nav.Expand" xml:space="preserve"><value>Espandi navigazione</value></data>
<data name="Shell.Nav.Import" xml:space="preserve"><value>Importa</value></data>
<data name="Shell.Nav.Jobs" xml:space="preserve"><value>Attività</value></data>
<data name="Shell.Nav.Library" xml:space="preserve"><value>Libreria</value></data>
@@ -24,6 +24,9 @@ public sealed class ArchiveTreeRowViewModel(ArchiveTreeNode node, ArchiveAvailab
public string ToggleToolTip => Loc.L(Node.IsExpanded ? "Tooltips.Archive.Collapse" : "Tooltips.Archive.Expand");
/// <summary>The expander's accessible name: two words, the sentence is its tooltip.</summary>
public string ToggleName => Loc.L(Node.IsExpanded ? "Archive.Tree.Collapse" : "Archive.Tree.Expand");
/// <summary>
/// The full title (the tree trims it) and its figures; a year also says how the keyboard opens and closes it, with
/// the arrow keys swapped in a right-to-left layout.
+1 -1
View File
@@ -305,7 +305,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button x:Name="Toggle" Style="{StaticResource Button.IconSubtle}" Width="22" Height="22" MinWidth="22" ui:ButtonIcon.Glyph="{StaticResource Icon.ChevronRight}"
Command="{Binding ToggleCommand}" ToolTip="{Binding ToggleToolTip}" AutomationProperties.Name="{Binding ToggleToolTip}" Visibility="Hidden"
Command="{Binding ToggleCommand}" ToolTip="{Binding ToggleToolTip}" AutomationProperties.Name="{Binding ToggleName}" Visibility="Hidden"
Focusable="False" />
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Title}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
<TextBlock x:Name="Detail" Grid.Column="2" Text="{Binding Detail}" Style="{StaticResource Text.Secondary}" VerticalAlignment="Center" Margin="8,0,0,0"
+1 -1
View File
@@ -36,7 +36,7 @@
<DockPanel Margin="8,8,8,8" LastChildFill="False">
<Button DockPanel.Dock="Top" Style="{StaticResource Button.IconSubtle}" HorizontalAlignment="Left" Margin="0,0,0,6"
ui:ButtonIcon.Glyph="{StaticResource Icon.Menu}" Command="{Binding ToggleRailCommand}"
ToolTip="{Binding RailToggleToolTip}" AutomationProperties.Name="{Binding RailToggleToolTip}" />
ToolTip="{Binding RailToggleToolTip}" AutomationProperties.Name="{Binding RailToggleName}" />
<ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding TopSections}" Focusable="False">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type shell:SectionViewModel}">
+4
View File
@@ -121,11 +121,15 @@ public sealed class ShellViewModel : LocalizedViewModel
if (!Set(ref _isRailCollapsed, value)) return;
_settings.RailCollapsed = value;
OnPropertyChanged(nameof(RailToggleToolTip));
OnPropertyChanged(nameof(RailToggleName));
}
}
public string RailToggleToolTip => Loc.L(IsRailCollapsed ? "Tooltips.Shell.ExpandRail" : "Tooltips.Shell.CollapseRail");
/// <summary>The rail button's accessible name: two words, the sentence is its tooltip.</summary>
public string RailToggleName => Loc.L(IsRailCollapsed ? "Shell.Nav.Expand" : "Shell.Nav.Collapse");
/// <summary>The sequence the editor opens (set by the Library and the Jobs screen).</summary>
public Guid? CurrentSequenceId
{
@@ -55,6 +55,8 @@ public sealed class ArchiveScreenSmokeTests
AssertEveryButtonIsNamed(app);
Assert.Contains(archive.SetText, AutomationProperties.GetName(SetButton(app)));
foreach (var row in TreeItems(app)) Assert.NotNull(row.FocusVisualStyle, "a tree row shows keyboard focus");
Assert.Equal(Loc.L("Archive.Tree.Collapse"), AutomationProperties.GetName(ButtonFor(app, archive.TreeRows[1].ToggleCommand)),
"the open year's expander has a short name; the sentence is its tooltip");
var sequence = archive.TreeRows.First(r => r.Node.Kind == TreeNodeKind.Sequence);
Assert.Contains(sequence.Title, sequence.RowToolTip);
@@ -218,6 +218,9 @@ public sealed class ScreenSmokeTests
Assert.Equal(Loc.L("Tooltips.Window.Minimize"), AutomationProperties.GetName(captions.Single(b => b.Command == SystemCommands.MinimizeWindowCommand)));
Assert.Equal(Loc.L("Tooltips.Window.Maximize"), AutomationProperties.GetName(captions.Single(b => b.Command == SystemCommands.MaximizeWindowCommand)));
Assert.Equal(Loc.L("Tooltips.Window.Close"), AutomationProperties.GetName(captions.Single(b => b.Command == SystemCommands.CloseWindowCommand)));
var railToggle = Descendants<Button>(window).Single(b => ReferenceEquals(b.Command, app.Shell.ToggleRailCommand));
Assert.Equal(Loc.L(app.Shell.IsRailCollapsed ? "Shell.Nav.Expand" : "Shell.Nav.Collapse"), AutomationProperties.GetName(railToggle),
"the rail button has a short name; the sentence is its tooltip");
var bar = (JobBar)window.FindName("JobBar");
Assert.Equal(AutomationLiveSetting.Polite, AutomationProperties.GetLiveSetting(bar));