Narrator reads incorrect information as “History and Memory list” in Programmer Calculator #1174 (#1286)

This commit is contained in:
Vignesh M 2020-06-27 03:08:42 +05:30 committed by GitHub
parent 876a7fe13c
commit a3163f64e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View File

@ -4707,4 +4707,12 @@
<value>Graph Options</value> <value>Graph Options</value>
<comment>Screen reader prompt for the graph options panel</comment> <comment>Screen reader prompt for the graph options panel</comment>
</data> </data>
<data name="DockPanel_HistoryMemoryLists" xml:space="preserve">
<value>History and Memory lists</value>
<comment>Automation name for the group of controls for history and memory lists.</comment>
</data>
<data name="DockPanel_MemoryList" xml:space="preserve">
<value>Memory list</value>
<comment>Automation name for the group of controls for memory list.</comment>
</data>
</root> </root>

View File

@ -71,8 +71,11 @@ void Calculator::LoadResourceStrings()
m_closeMemoryFlyoutAutomationName = resProvider->GetResourceString(L"MemoryButton_Close"); m_closeMemoryFlyoutAutomationName = resProvider->GetResourceString(L"MemoryButton_Close");
m_openHistoryFlyoutAutomationName = resProvider->GetResourceString(L"HistoryButton_Open"); m_openHistoryFlyoutAutomationName = resProvider->GetResourceString(L"HistoryButton_Open");
m_closeHistoryFlyoutAutomationName = resProvider->GetResourceString(L"HistoryButton_Close"); m_closeHistoryFlyoutAutomationName = resProvider->GetResourceString(L"HistoryButton_Close");
m_dockPanelHistoryMemoryLists = resProvider->GetResourceString(L"DockPanel_HistoryMemoryLists");
m_dockPanelMemoryList = resProvider->GetResourceString(L"DockPanel_MemoryList");
AutomationProperties::SetName(MemoryButton, m_openMemoryFlyoutAutomationName); AutomationProperties::SetName(MemoryButton, m_openMemoryFlyoutAutomationName);
AutomationProperties::SetName(HistoryButton, m_openHistoryFlyoutAutomationName); AutomationProperties::SetName(HistoryButton, m_openHistoryFlyoutAutomationName);
AutomationProperties::SetName(DockPanel, m_dockPanelHistoryMemoryLists);
} }
void Calculator::InitializeHistoryView(_In_ HistoryViewModel ^ historyVM) void Calculator::InitializeHistoryView(_In_ HistoryViewModel ^ historyVM)
@ -343,6 +346,14 @@ void Calculator::OnModeVisualStateCompleted(_In_ Object ^ sender, _In_ Object ^
AnimateWithoutResult->Begin(); AnimateWithoutResult->Begin();
} }
} }
if (IsProgrammer)
{
AutomationProperties::SetName(DockPanel, m_dockPanelMemoryList);
}
else
{
AutomationProperties::SetName(DockPanel, m_dockPanelHistoryMemoryLists);
}
} }
void Calculator::EnsureScientific() void Calculator::EnsureScientific()

View File

@ -116,6 +116,8 @@ public
Platform::String ^ m_closeMemoryFlyoutAutomationName; Platform::String ^ m_closeMemoryFlyoutAutomationName;
Platform::String ^ m_openHistoryFlyoutAutomationName; Platform::String ^ m_openHistoryFlyoutAutomationName;
Platform::String ^ m_closeHistoryFlyoutAutomationName; Platform::String ^ m_closeHistoryFlyoutAutomationName;
Platform::String ^ m_dockPanelHistoryMemoryLists;
Platform::String ^ m_dockPanelMemoryList;
Windows::UI::Xaml::Controls::PivotItem ^ m_pivotItem; Windows::UI::Xaml::Controls::PivotItem ^ m_pivotItem;
bool m_IsDigit = false; bool m_IsDigit = false;