work on accessibility
This commit is contained in:
parent
cb2859ff60
commit
57ab7cabcf
12 changed files with 86 additions and 7 deletions
|
@ -37,7 +37,10 @@ namespace SafeExamBrowser.I18n.Contracts
|
|||
BrowserWindow_MenuButton,
|
||||
BrowserWindow_ReloadButton,
|
||||
BrowserWindow_UrlTextBox,
|
||||
BrowserWindow_ZoomLevelReset,
|
||||
BrowserWindow_ZoomMenuItem,
|
||||
BrowserWindow_ZoomMenuMinus,
|
||||
BrowserWindow_ZoomMenuPlus,
|
||||
Build,
|
||||
ExamSelectionDialog_Cancel,
|
||||
ExamSelectionDialog_Message,
|
||||
|
|
|
@ -69,9 +69,18 @@
|
|||
<Entry key="BrowserWindow_UrlTextBox">
|
||||
URL eingeben
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomLevelReset">
|
||||
Seiten-Zoom bei %%ZOOM%% %. Klicken zum Zurücksetzen.
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuItem">
|
||||
Seiten-Zoom
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuPlus">
|
||||
Zoom vergrössern
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuMinus">
|
||||
Zoom verkleinern
|
||||
</Entry>
|
||||
<Entry key="Build">
|
||||
Build
|
||||
</Entry>
|
||||
|
|
|
@ -69,9 +69,18 @@
|
|||
<Entry key="BrowserWindow_UrlTextBox">
|
||||
Enter URL
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomLevelReset">
|
||||
Page Zoom at %%ZOOM%% %. Click to Reset.
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuItem">
|
||||
Page Zoom
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuPlus">
|
||||
Increase Page Zoom
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuMinus">
|
||||
Decrease Page Zoom
|
||||
</Entry>
|
||||
<Entry key="Build">
|
||||
Build
|
||||
</Entry>
|
||||
|
|
|
@ -69,9 +69,18 @@
|
|||
<Entry key="BrowserWindow_UrlTextBox">
|
||||
Entrer l'URL
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomLevelReset">
|
||||
Zoom de la page à %%ZOOM%% %. Cliquer pour réinitialiser.
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuItem">
|
||||
Zoom de la page
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuPlus">
|
||||
Augmenter zoom
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuMinus">
|
||||
Diminuer zoom
|
||||
</Entry>
|
||||
<Entry key="Build">
|
||||
Build
|
||||
</Entry>
|
||||
|
|
|
@ -69,9 +69,18 @@
|
|||
<Entry key="BrowserWindow_UrlTextBox">
|
||||
Inserisci URL
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomLevelReset">
|
||||
Zoom della pagina al %%ZOOM%% %. Fare clic per ripristinare.
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuItem">
|
||||
Zoom della pagina
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuPlus">
|
||||
Aumentare zoom
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuMinus">
|
||||
Diminuire zoom
|
||||
</Entry>
|
||||
<Entry key="Build">
|
||||
Build
|
||||
</Entry>
|
||||
|
|
|
@ -66,9 +66,18 @@
|
|||
<Entry key="BrowserWindow_UrlTextBox">
|
||||
输入网址
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomLevelReset">
|
||||
页面缩放为 %%ZOOM%% %。点击重置。
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuItem">
|
||||
页面缩放
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuPlus">
|
||||
增加页面缩放
|
||||
</Entry>
|
||||
<Entry key="BrowserWindow_ZoomMenuMinus">
|
||||
减少页面缩放
|
||||
</Entry>
|
||||
<Entry key="Build">
|
||||
生成
|
||||
</Entry>
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.ActionCenter
|
|||
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
|
||||
Text.Text = tooltip;
|
||||
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
|
||||
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
|
||||
}
|
||||
|
||||
private void RenderCharge(double charge, BatteryChargeStatus status)
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Media;
|
||||
|
@ -102,7 +101,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Controls.Taskbar
|
|||
Button.ToolTip = tooltip;
|
||||
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
|
||||
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
|
||||
AutomationProperties.SetHelpText(this, Button.ToolTip as string);
|
||||
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
|
||||
}
|
||||
|
||||
private void RenderCharge(double charge, BatteryChargeStatus status)
|
||||
|
|
|
@ -11,6 +11,7 @@ using System.ComponentModel;
|
|||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
|
@ -196,7 +197,12 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
|||
|
||||
public void UpdateZoomLevel(double value)
|
||||
{
|
||||
Dispatcher.Invoke(() => ZoomLevel.Text = $"{value}%");
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
ZoomLevel.Text = $"{value}%";
|
||||
var zoomButtonHelpText = this.text.Get(TextKey.BrowserWindow_ZoomLevelReset).Replace("%%ZOOM%%", value.ToString("0"));
|
||||
ZoomResetButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, zoomButtonHelpText);
|
||||
});
|
||||
}
|
||||
|
||||
private void BrowserWindow_Closing(object sender, CancelEventArgs e)
|
||||
|
@ -297,6 +303,12 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Key == Key.Escape && MenuPopup.IsOpen)
|
||||
{
|
||||
MenuPopup.IsOpen = false;
|
||||
MenuButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -586,9 +598,13 @@ if (typeof __SEB_focusElement === 'undefined') {
|
|||
private void LoadText()
|
||||
{
|
||||
DeveloperConsoleText.Text = text.Get(TextKey.BrowserWindow_DeveloperConsoleMenuItem);
|
||||
DeveloperConsoleButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_DeveloperConsoleMenuItem));
|
||||
FindCaseSensitiveCheckBox.Content = text.Get(TextKey.BrowserWindow_FindCaseSensitive);
|
||||
FindMenuText.Text = text.Get(TextKey.BrowserWindow_FindMenuItem);
|
||||
FindMenuButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_FindMenuItem));
|
||||
ZoomText.Text = text.Get(TextKey.BrowserWindow_ZoomMenuItem);
|
||||
ZoomInButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_ZoomMenuPlus));
|
||||
ZoomOutButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_ZoomMenuMinus));
|
||||
ReloadButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_ReloadButton));
|
||||
BackwardButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_BackwardButton));
|
||||
ForwardButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_ForwardButton));
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.ActionCenter
|
|||
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
|
||||
Text.Text = tooltip;
|
||||
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
|
||||
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
|
||||
}
|
||||
|
||||
private void RenderCharge(double charge, BatteryChargeStatus status)
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Automation;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Media;
|
||||
|
@ -102,7 +101,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Controls.Taskbar
|
|||
Button.ToolTip = tooltip;
|
||||
PowerPlug.Visibility = status.IsOnline ? Visibility.Visible : Visibility.Collapsed;
|
||||
Warning.Visibility = status.BatteryChargeStatus == BatteryChargeStatus.Critical ? Visibility.Visible : Visibility.Collapsed;
|
||||
AutomationProperties.SetHelpText(this, Button.ToolTip as string);
|
||||
Button.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, tooltip);
|
||||
}
|
||||
|
||||
private void RenderCharge(double charge, BatteryChargeStatus status)
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
}
|
||||
|
||||
public void UpdateProgress(double value)
|
||||
{
|
||||
{
|
||||
Dispatcher.Invoke(() => ProgressBar.Value = value * 100);
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,12 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
|
||||
public void UpdateZoomLevel(double value)
|
||||
{
|
||||
Dispatcher.Invoke(() => ZoomLevel.Text = $"{value}%");
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
ZoomLevel.Text = $"{value}%";
|
||||
var zoomButtonHelpText = this.text.Get(TextKey.BrowserWindow_ZoomLevelReset).Replace("%%ZOOM%%", value.ToString("0"));
|
||||
ZoomResetButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, zoomButtonHelpText);
|
||||
});
|
||||
}
|
||||
|
||||
private void BrowserWindow_Closing(object sender, CancelEventArgs e)
|
||||
|
@ -292,6 +297,12 @@ namespace SafeExamBrowser.UserInterface.Mobile.Windows
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Key == Key.Escape && MenuPopup.IsOpen)
|
||||
{
|
||||
MenuPopup.IsOpen = false;
|
||||
MenuButton.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -591,9 +602,13 @@ if (typeof __SEB_focusElement === 'undefined') {
|
|||
private void LoadText()
|
||||
{
|
||||
DeveloperConsoleText.Text = text.Get(TextKey.BrowserWindow_DeveloperConsoleMenuItem);
|
||||
DeveloperConsoleButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_DeveloperConsoleMenuItem));
|
||||
FindCaseSensitiveCheckBox.Content = text.Get(TextKey.BrowserWindow_FindCaseSensitive);
|
||||
FindMenuText.Text = text.Get(TextKey.BrowserWindow_FindMenuItem);
|
||||
FindMenuButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_FindMenuItem));
|
||||
ZoomText.Text = text.Get(TextKey.BrowserWindow_ZoomMenuItem);
|
||||
ZoomInButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_ZoomMenuPlus));
|
||||
ZoomOutButton.SetValue(System.Windows.Automation.AutomationProperties.HelpTextProperty, text.Get(TextKey.BrowserWindow_ZoomMenuMinus));
|
||||
ReloadButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_ReloadButton));
|
||||
BackwardButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_BackwardButton));
|
||||
ForwardButton.SetValue(System.Windows.Automation.AutomationProperties.NameProperty, text.Get(TextKey.BrowserWindow_ForwardButton));
|
||||
|
|
Loading…
Add table
Reference in a new issue