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

@@ -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));