From 33b4d18638523daee9aa9b9484cc2b517576def8 Mon Sep 17 00:00:00 2001 From: Stephanie Anderl <46726333+sanderl@users.noreply.github.com> Date: Thu, 9 Apr 2020 13:16:05 -0700 Subject: [PATCH] Add Automation Names to UI Elements in EquationInputArea and KGF Panel (#1133) * Missing EquationInputArea and KGF Automation Names added * Updated the KGF back button automation name and tooltip and added the automation name string for the KGF equation edit box * Reverted the removal of x:names and updated Variable Step Textbox to Variable Step Value Textbox per PR feedback * Updated the VariableListViewItem narrator announcement to include the name of the variable --- .../GraphingCalculator/VariableViewModel.h | 10 ++++ src/Calculator/Resources/en-US/Resources.resw | 54 +++++++++++++++++-- .../GraphingCalculator/EquationInputArea.xaml | 17 ++++-- .../KeyGraphFeaturesPanel.xaml | 3 +- 4 files changed, 76 insertions(+), 8 deletions(-) diff --git a/src/CalcViewModel/GraphingCalculator/VariableViewModel.h b/src/CalcViewModel/GraphingCalculator/VariableViewModel.h index b412073f..cd5ffce9 100644 --- a/src/CalcViewModel/GraphingCalculator/VariableViewModel.h +++ b/src/CalcViewModel/GraphingCalculator/VariableViewModel.h @@ -4,6 +4,7 @@ #pragma once #include "../Common/Utils.h" +#include "CalcViewModel/Common/LocalizationStringUtil.h" #include "EquationViewModel.h" namespace CalculatorApp::ViewModel @@ -107,6 +108,15 @@ public } } + property Platform::String ^ VariableAutomationName + { + Platform::String ^ get() + { + return CalculatorApp::Common::LocalizationStringUtil::GetLocalizedString( + CalculatorApp::AppResourceProvider::GetInstance()->GetResourceString(L"VariableListViewItem"), Name); + } + } + private: GraphControl::Variable ^ m_variable; }; diff --git a/src/Calculator/Resources/en-US/Resources.resw b/src/Calculator/Resources/en-US/Resources.resw index f57fdd8d..46cfce4e 100644 --- a/src/Calculator/Resources/en-US/Resources.resw +++ b/src/Calculator/Resources/en-US/Resources.resw @@ -4267,11 +4267,11 @@ Error that occurs during graphing when complex numbers are used in inequalities. - Back + Back to function list This is the tooltip for the back button in the equation analysis page in the graphing calculator - Back + Back to function list This is the automation name for the back button in the equation analysis page in the graphing calculator @@ -4469,6 +4469,50 @@ Select All Select all menu item from the Equation TextBox + + + Function Input List Item + The automation name for the Equation Input ListView item that is shown when Calculator is in graphing mode. + + + Function Input List + The automation name for the Equation Input ListView that is shown when Calculator is in graphing mode. + + + Function Input Panel + The automation name for the Equation Input StackPanel that is shown when Calculator is in graphing mode. + + + Variable Panel + The automation name for the Variable StackPanel that is shown when Calculator is in graphing mode. + + + Variable List + The automation name for the Variable ListView that is shown when Calculator is in graphing mode. + + + Variable %1 List Item + The automation name for the Variable ListViewItem that is shown when Calculator is in graphing mode. + + + Variable Value Textbox + The automation name for the Variable Value Textbox that is shown when Calculator is in graphing mode. + + + Variable Value Slider + The automation name for the Variable Value Slider that is shown when Calculator is in graphing mode. + + + Variable Minimum Value Textbox + The automation name for the Variable Min Value Textbox that is shown when Calculator is in graphing mode. + + + Variable Step Value Textbox + The automation name for the Variable Step Textbox that is shown when Calculator is in graphing mode. + + + Variable Maximum Value Textbox + The automation name for the Variable Max Value Textbox that is shown when Calculator is in graphing mode. Solid line style @@ -4558,7 +4602,7 @@ Always light This is the automation name text for the Graph settings option to set graph to light theme - + Match app theme This is the automation name text for the Graph settings option to set graph to match the app theme @@ -4566,4 +4610,8 @@ Function removed Announcement used in Graphing Calculator when a function is removed from the function list + + Function Analysis Equation Box + This is the automation name text for the equation box in the function analsis panel + diff --git a/src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml b/src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml index 6bc741aa..49cb4173 100644 --- a/src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml +++ b/src/Calculator/Views/GraphingCalculator/EquationInputArea.xaml @@ -18,7 +18,9 @@ - + @@ -111,6 +113,7 @@ Text="="/> - - + - -