Fix some accessibility bugs (#1047)

* Fix accessibility bugs

* style fix
This commit is contained in:
Pepe Rivera 2020-02-27 11:54:29 -08:00 committed by GitHub
parent 0c8d6dd83c
commit f97c084a67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 12 deletions

View File

@ -62,8 +62,11 @@ void EquationTextBox::OnApplyTemplate()
m_equationButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnEquationButtonClicked);
auto toolTip = ref new ToolTip();
auto equationButtonMessage = m_equationButton->IsChecked->Value ? resProvider->GetResourceString(L"showEquationButtonToolTip")
: resProvider->GetResourceString(L"hideEquationButtonToolTip");
auto equationButtonMessage = LocalizationStringUtil::GetLocalizedString(
m_equationButton->IsChecked->Value ? resProvider->GetResourceString(L"showEquationButtonToolTip")
: resProvider->GetResourceString(L"hideEquationButtonToolTip"));
toolTip->Content = equationButtonMessage;
ToolTipService::SetToolTip(m_equationButton, toolTip);
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
@ -202,8 +205,11 @@ void EquationTextBox::OnEquationButtonClicked(Object ^ sender, RoutedEventArgs ^
auto toolTip = ref new ToolTip();
auto resProvider = AppResourceProvider::GetInstance();
auto equationButtonMessage = m_equationButton->IsChecked->Value ? resProvider->GetResourceString(L"showEquationButtonToolTip")
: resProvider->GetResourceString(L"hideEquationButtonToolTip");
auto equationButtonMessage = LocalizationStringUtil::GetLocalizedString(
m_equationButton->IsChecked->Value ? resProvider->GetResourceString(L"showEquationButtonToolTip")
: resProvider->GetResourceString(L"hideEquationButtonToolTip"));
toolTip->Content = equationButtonMessage;
ToolTipService::SetToolTip(m_equationButton, toolTip);
AutomationProperties::SetName(m_equationButton, equationButtonMessage);

View File

@ -3876,7 +3876,7 @@
<comment>{Locked}This is the shortcut for the zoom reset button.</comment>
</data>
<data name="zoomResetButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Reset View</value>
<value>Reset View (Ctrl + 0)</value>
<comment>This is the tool tip automation name for the Calculator zoom reset button.</comment>
</data>
<data name="zoomResetButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
@ -3884,7 +3884,7 @@
<comment>Screen reader prompt for the reset zoom button.</comment>
</data>
<data name="zoomInButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Zoom In</value>
<value>Zoom In (Ctrl + plus)</value>
<comment>This is the tool tip automation name for the Calculator zoom in button.</comment>
</data>
<data name="zoomInButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
@ -3892,7 +3892,7 @@
<comment>Screen reader prompt for the zoom in button.</comment>
</data>
<data name="zoomOutButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
<value>Zoom Out</value>
<value>Zoom Out (Ctrl + minus)</value>
<comment>This is the tool tip automation name for the Calculator zoom out button.</comment>
</data>
<data name="zoomOutButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
@ -4159,12 +4159,12 @@
<comment>This is the text for the for the equation style context menu command</comment>
</data>
<data name="showEquationButtonToolTip" xml:space="preserve">
<value>Show</value>
<comment>This is the tooltip/automation name shown when visibility is set to hidden in the graphing calculator</comment>
<value>Show equation %1</value>
<comment>{Locked="%1"}, This is the tooltip/automation name shown when visibility is set to hidden in the graphing calculator. %1 is the equation number.</comment>
</data>
<data name="hideEquationButtonToolTip" xml:space="preserve">
<value>Hide</value>
<comment>This is the tooltip/automation name shown when visibility is set to visible in the graphing calculator</comment>
<value>Hide equation %1</value>
<comment>{Locked="%1"}, This is the tooltip/automation name shown when visibility is set to visible in the graphing calculator. %1 is the equation number.</comment>
</data>
<data name="disableTracingButtonToolTip" xml:space="preserve">
<value>Stop tracing</value>