accessibility bugfixes

This commit is contained in:
Jonas Sourlier 2022-05-24 11:25:00 +02:00
parent 57ab7cabcf
commit 475c46529f
8 changed files with 8 additions and 4 deletions

View file

@ -121,6 +121,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
{ {
Button.ToolTip = text; Button.ToolTip = text;
Text.Text = text; Text.Text = text;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text);
} }
private UIElement GetWirelessIcon(int signalStrength) private UIElement GetWirelessIcon(int signalStrength)

View file

@ -87,7 +87,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed; PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
Text.Text = tooltip; Text.Text = tooltip;
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed; Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip); this.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
} }
private void RenderCharge(double charge, BatteryChargeStatus status) private void RenderCharge(double charge, BatteryChargeStatus status)

View file

@ -88,6 +88,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
{ {
WirelessIcon.Child = GetWirelessIcon(network.SignalStrength); WirelessIcon.Child = GetWirelessIcon(network.SignalStrength);
Button.ToolTip = text.Get(TextKey.SystemControl_NetworkWirelessConnected).Replace("%%NAME%%", network.Name); Button.ToolTip = text.Get(TextKey.SystemControl_NetworkWirelessConnected).Replace("%%NAME%%", network.Name);
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, Button.ToolTip as string);
} }
WirelessNetworksStackPanel.Children.Add(button); WirelessNetworksStackPanel.Children.Add(button);

View file

@ -101,7 +101,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
Button.ToolTip = tooltip; Button.ToolTip = tooltip;
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed; PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed; Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip); this.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
} }
private void RenderCharge(double charge, BatteryChargeStatus status) private void RenderCharge(double charge, BatteryChargeStatus status)

View file

@ -121,6 +121,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
{ {
Button.ToolTip = text; Button.ToolTip = text;
Text.Text = text; Text.Text = text;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text);
} }
private UIElement GetWirelessIcon(int signalStrength) private UIElement GetWirelessIcon(int signalStrength)

View file

@ -87,7 +87,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed; PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
Text.Text = tooltip; Text.Text = tooltip;
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed; Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip); this.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
} }
private void RenderCharge(double charge, BatteryChargeStatus status) private void RenderCharge(double charge, BatteryChargeStatus status)

View file

@ -88,6 +88,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
{ {
WirelessIcon.Child = GetWirelessIcon(network.SignalStrength); WirelessIcon.Child = GetWirelessIcon(network.SignalStrength);
Button.ToolTip = text.Get(TextKey.SystemControl_NetworkWirelessConnected).Replace("%%NAME%%", network.Name); Button.ToolTip = text.Get(TextKey.SystemControl_NetworkWirelessConnected).Replace("%%NAME%%", network.Name);
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, Button.ToolTip as string);
} }
WirelessNetworksStackPanel.Children.Add(button); WirelessNetworksStackPanel.Children.Add(button);

View file

@ -101,7 +101,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
Button.ToolTip = tooltip; Button.ToolTip = tooltip;
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed; PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed; Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip); this.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
} }
private void RenderCharge(double charge, BatteryChargeStatus status) private void RenderCharge(double charge, BatteryChargeStatus status)