Fix some accessibility bugs (#1047)
* Fix accessibility bugs * style fix
This commit is contained in:
parent
0c8d6dd83c
commit
f97c084a67
@ -62,8 +62,11 @@ void EquationTextBox::OnApplyTemplate()
|
|||||||
m_equationButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnEquationButtonClicked);
|
m_equationButton->Click += ref new RoutedEventHandler(this, &EquationTextBox::OnEquationButtonClicked);
|
||||||
|
|
||||||
auto toolTip = ref new ToolTip();
|
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;
|
toolTip->Content = equationButtonMessage;
|
||||||
ToolTipService::SetToolTip(m_equationButton, toolTip);
|
ToolTipService::SetToolTip(m_equationButton, toolTip);
|
||||||
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
|
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
|
||||||
@ -202,8 +205,11 @@ void EquationTextBox::OnEquationButtonClicked(Object ^ sender, RoutedEventArgs ^
|
|||||||
|
|
||||||
auto toolTip = ref new ToolTip();
|
auto toolTip = ref new ToolTip();
|
||||||
auto resProvider = AppResourceProvider::GetInstance();
|
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;
|
toolTip->Content = equationButtonMessage;
|
||||||
ToolTipService::SetToolTip(m_equationButton, toolTip);
|
ToolTipService::SetToolTip(m_equationButton, toolTip);
|
||||||
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
|
AutomationProperties::SetName(m_equationButton, equationButtonMessage);
|
||||||
|
@ -3876,7 +3876,7 @@
|
|||||||
<comment>{Locked}This is the shortcut for the zoom reset button.</comment>
|
<comment>{Locked}This is the shortcut for the zoom reset button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomResetButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
<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>
|
<comment>This is the tool tip automation name for the Calculator zoom reset button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomResetButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
<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>
|
<comment>Screen reader prompt for the reset zoom button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomInButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
<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>
|
<comment>This is the tool tip automation name for the Calculator zoom in button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomInButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
<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>
|
<comment>Screen reader prompt for the zoom in button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomOutButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
<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>
|
<comment>This is the tool tip automation name for the Calculator zoom out button.</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="zoomOutButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
<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>
|
<comment>This is the text for the for the equation style context menu command</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="showEquationButtonToolTip" xml:space="preserve">
|
<data name="showEquationButtonToolTip" xml:space="preserve">
|
||||||
<value>Show</value>
|
<value>Show equation %1</value>
|
||||||
<comment>This is the tooltip/automation name shown when visibility is set to hidden in the graphing calculator</comment>
|
<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>
|
||||||
<data name="hideEquationButtonToolTip" xml:space="preserve">
|
<data name="hideEquationButtonToolTip" xml:space="preserve">
|
||||||
<value>Hide</value>
|
<value>Hide equation %1</value>
|
||||||
<comment>This is the tooltip/automation name shown when visibility is set to visible in the graphing calculator</comment>
|
<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>
|
||||||
<data name="disableTracingButtonToolTip" xml:space="preserve">
|
<data name="disableTracingButtonToolTip" xml:space="preserve">
|
||||||
<value>Stop tracing</value>
|
<value>Stop tracing</value>
|
||||||
@ -4258,4 +4258,4 @@
|
|||||||
<value>Enter an equation</value>
|
<value>Enter an equation</value>
|
||||||
<comment>this is the placeholder text used by the textbox to enter an equation</comment>
|
<comment>this is the placeholder text used by the textbox to enter an equation</comment>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
Loading…
Reference in New Issue
Block a user