From 548d947a57f6b033a74f6d501f4992cb2bc443b2 Mon Sep 17 00:00:00 2001 From: Jonas Sourlier Date: Thu, 22 Sep 2022 11:28:33 +0200 Subject: [PATCH] set tooltip help text for JAWS --- .../Controls/ActionCenter/KeyboardLayoutControl.xaml.cs | 2 ++ .../Controls/Taskbar/KeyboardLayoutControl.xaml.cs | 2 ++ .../Controls/ActionCenter/KeyboardLayoutControl.xaml.cs | 2 ++ .../Controls/Taskbar/KeyboardLayoutControl.xaml.cs | 2 ++ 4 files changed, 8 insertions(+) diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs index 24eaedf8..5085b952 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs @@ -7,6 +7,7 @@ */ using System.Threading.Tasks; +using System.Windows.Automation; using System.Windows.Controls; using System.Windows.Media; using SafeExamBrowser.I18n.Contracts; @@ -96,6 +97,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter Text.Text = layout.CultureName; Button.ToolTip = tooltip; + AutomationProperties.SetHelpText(Button, tooltip); } private void Popup_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs index da280d12..29164785 100644 --- a/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/KeyboardLayoutControl.xaml.cs @@ -10,6 +10,7 @@ using System; using System.Linq; using System.Threading.Tasks; using System.Windows; +using System.Windows.Automation; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; @@ -120,6 +121,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar LayoutCultureCode.Text = layout.CultureCode; Button.ToolTip = tooltip; + AutomationProperties.SetHelpText(Button, tooltip); } private void Popup_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs index eeed1afd..6ad9a883 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/KeyboardLayoutControl.xaml.cs @@ -7,6 +7,7 @@ */ using System.Threading.Tasks; +using System.Windows.Automation; using System.Windows.Controls; using System.Windows.Media; using SafeExamBrowser.I18n.Contracts; @@ -96,6 +97,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter Text.Text = layout.CultureName; Button.ToolTip = tooltip; + AutomationProperties.SetHelpText(Button, tooltip); } private void Popup_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) diff --git a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs index 091ce98d..5c685e75 100644 --- a/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs +++ b/SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/KeyboardLayoutControl.xaml.cs @@ -10,6 +10,7 @@ using System; using System.Linq; using System.Threading.Tasks; using System.Windows; +using System.Windows.Automation; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; @@ -120,6 +121,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar LayoutCultureCode.Text = layout.CultureCode; Button.ToolTip = tooltip; + AutomationProperties.SetHelpText(Button, tooltip); } private void Popup_KeyUp(object sender, System.Windows.Input.KeyEventArgs e)