diff --git a/src/Titano.Setup/Views/SetupViewModel.cs b/src/Titano.Setup/Views/SetupViewModel.cs
index d8b0d190..8cc1b642 100644
--- a/src/Titano.Setup/Views/SetupViewModel.cs
+++ b/src/Titano.Setup/Views/SetupViewModel.cs
@@ -245,6 +245,7 @@ internal sealed class SetupViewModel : LocalizedViewModel, INotifyDataErrorInfo
public bool HasLaunchOption => _engine?.LaunchTarget(SelectedComponents) is not null;
public string InstallText => CanChangeLocation ? Loc.L("Setup.Action.Install") : Loc.L("Setup.Action.Update");
+
/// What Install does, or why it is disabled: no program selected, or a folder it cannot use.
public string InstallToolTip => !Components.Any(c => c.IsSelected) ? Loc.L("Tooltips.Setup.NoComponent")
: !IsDirectoryValid ? Loc.L("Tooltips.Setup.FolderInvalid")
diff --git a/src/Titano.Setup/Views/SetupWindow.xaml b/src/Titano.Setup/Views/SetupWindow.xaml
index 467ddbf3..e7a794fb 100644
--- a/src/Titano.Setup/Views/SetupWindow.xaml
+++ b/src/Titano.Setup/Views/SetupWindow.xaml
@@ -102,7 +102,7 @@
-
diff --git a/src/Titano.Setup/Views/SetupWindow.xaml.cs b/src/Titano.Setup/Views/SetupWindow.xaml.cs
index 8cf8e360..17a292d2 100644
--- a/src/Titano.Setup/Views/SetupWindow.xaml.cs
+++ b/src/Titano.Setup/Views/SetupWindow.xaml.cs
@@ -59,19 +59,29 @@ internal sealed partial class SetupWindow : TitanoWindow
e.Handled = true;
}
- /// A new stage collapses the focused button: the keyboard moves to the new default and the outcome is read out.
+ ///
+ /// A new stage collapses the focused button: the keyboard moves to the new default and the outcome is read out.
+ /// The "Remove my data" plan is read out when it appears.
+ ///
private void OnModelChanged(object? sender, PropertyChangedEventArgs e)
{
+ if (e.PropertyName == nameof(SetupViewModel.IsDataPlanVisible) && _model.IsDataPlanVisible)
+ Dispatcher.BeginInvoke(DispatcherPriority.Loaded, () => Announce(DataPlanHeading));
if (_model.Stage == _shownStage) return;
_shownStage = _model.Stage;
Dispatcher.BeginInvoke(DispatcherPriority.Loaded, () =>
{
FocusDefault();
- if (StageMessage() is { IsVisible: true } message)
- UIElementAutomationPeer.CreatePeerForElement(message)?.RaiseAutomationEvent(AutomationEvents.LiveRegionChanged);
+ if (StageMessage() is { } message) Announce(message);
});
}
+ /// Asks screen readers to read (it carries a live setting).
+ private static void Announce(UIElement element)
+ {
+ if (element.IsVisible) UIElementAutomationPeer.CreatePeerForElement(element)?.RaiseAutomationEvent(AutomationEvents.LiveRegionChanged);
+ }
+
private TextBlock? StageMessage() => _model.Stage switch
{
SetupStage.Confirm => ConfirmMessage,