merge: shared kit follow-ups (disabled lists, chart contrast and keyboard, RTL category charts, error toasts, short names)

Resolved: ArchiveView keeps the shared dialog dictionary from the Library branch
and drops its local focus and list styles, now in the kit; the redundant
left-to-right flag on the Move template box goes from ArchiveDialogs.xaml.
Archive.View.Maintenance also leaves the 23 newly translated catalogs.

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 22:22:46 +00:00
commit 9930959883
72 files changed
+686 -262

No files matched your search

@@ -1,8 +1,10 @@
using System.IO;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
@@ -197,6 +199,12 @@ public sealed class ScreenSmokeTests
await app.ExpectAsync<LibraryView>("library-toast-done");
Assert.True(ran, "the action ran");
Assert.Equal(0, host.Toasts.Count, "the toast closes once its action has run");
// A failure interrupts the screen reader (assertive); a notice waits its turn.
Assert.False(await ArchiveActions.TryAsync(app.Shell, _ => throw new IOException("The archive drive is gone")));
Assert.True(host.Toasts.Single().IsError, "a failed archive action is announced at once");
app.Shell.Notify("Harbour sunset rendered");
Assert.False(host.Toasts[^1].IsError, "a notice is announced in turn");
});
[Test]
@@ -210,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));
@@ -311,10 +322,22 @@ public sealed class ScreenSmokeTests
luminance[theme] = MeanLuminance(bitmap);
Assert.Greater(Distinct(bitmap), 8, $"{screen} drew almost nothing in {theme}");
}
AssertIconOnlyControlsNamed(screen);
Assert.Less(luminance[AppTheme.Dark], luminance[AppTheme.Light], $"{screen}: the light theme is not lighter than the dark one");
ThemeManager.Apply(AppTheme.Dark);
}
/// <summary>DESIGN §4: every visible icon-only button or segment has an accessible name and a tooltip.</summary>
public void AssertIconOnlyControlsNamed(string screen)
{
foreach (var control in FindAll<Control>().Where(c => c.IsVisible && IsIconOnly(c)))
{
var name = AutomationProperties.GetName(control);
Assert.False(string.IsNullOrWhiteSpace(name), $"{screen}: an icon-only {control.GetType().Name} bound to {(control as ButtonBase)?.Command} has no name");
Assert.True(control.ToolTip is not null, $"{screen}: '{name}' has no tooltip");
}
}
public List<T> FindAll<T>()
where T : DependencyObject
{
@@ -354,6 +377,13 @@ public sealed class ScreenSmokeTests
return bitmap;
}
private static bool IsIconOnly(Control control) => control switch
{
SegmentedItem segment => segment.Content is null && segment.Glyph is not null,
ButtonBase button => button.Content is null && ButtonIcon.GetGlyph(button) is not null,
_ => false,
};
private static byte[] Pixels(BitmapSource bitmap)
{
var pixels = new byte[bitmap.PixelWidth * bitmap.PixelHeight * 4];