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
This commit is contained in:
parent
07108af967
commit
33b4d18638
@ -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;
|
||||
};
|
||||
|
@ -4267,11 +4267,11 @@
|
||||
<comment>Error that occurs during graphing when complex numbers are used in inequalities.</comment>
|
||||
</data>
|
||||
<data name="equationAnalysisBack.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
<value>Back to function list</value>
|
||||
<comment>This is the tooltip for the back button in the equation analysis page in the graphing calculator</comment>
|
||||
</data>
|
||||
<data name="equationAnalysisBack.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
<value>Back to function list</value>
|
||||
<comment>This is the automation name for the back button in the equation analysis page in the graphing calculator</comment>
|
||||
</data>
|
||||
<data name="functionAnalysisButton.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve">
|
||||
@ -4469,6 +4469,50 @@
|
||||
<data name="selectAllEquationMenuItem.Text" xml:space="preserve">
|
||||
<value>Select All</value>
|
||||
<comment>Select all menu item from the Equation TextBox</comment>
|
||||
</data>
|
||||
<data name="EquationInputButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Function Input List Item</value>
|
||||
<comment>The automation name for the Equation Input ListView item that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="EquationInputList.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Function Input List</value>
|
||||
<comment>The automation name for the Equation Input ListView that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="EquationInputPanel.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Function Input Panel</value>
|
||||
<comment>The automation name for the Equation Input StackPanel that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableStackPanel.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Panel</value>
|
||||
<comment>The automation name for the Variable StackPanel that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableListView.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable List</value>
|
||||
<comment>The automation name for the Variable ListView that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableListViewItem" xml:space="preserve">
|
||||
<value>Variable %1 List Item</value>
|
||||
<comment>The automation name for the Variable ListViewItem that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableValueTextBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Value Textbox</value>
|
||||
<comment>The automation name for the Variable Value Textbox that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableValueSlider.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Value Slider</value>
|
||||
<comment>The automation name for the Variable Value Slider that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableMinTextBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Minimum Value Textbox</value>
|
||||
<comment>The automation name for the Variable Min Value Textbox that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableStepTextBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Step Value Textbox</value>
|
||||
<comment>The automation name for the Variable Step Textbox that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="VariableMaxTextBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Variable Maximum Value Textbox</value>
|
||||
<comment>The automation name for the Variable Max Value Textbox that is shown when Calculator is in graphing mode.</comment>
|
||||
</data>
|
||||
<data name="solidLineStyleAutomationName" xml:space="preserve">
|
||||
<value>Solid line style</value>
|
||||
@ -4558,7 +4602,7 @@
|
||||
<value>Always light</value>
|
||||
<comment>This is the automation name text for the Graph settings option to set graph to light theme</comment>
|
||||
</data>
|
||||
<data name="MatchAppTheme.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<data name="MatchAppTheme.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Match app theme</value>
|
||||
<comment>This is the automation name text for the Graph settings option to set graph to match the app theme</comment>
|
||||
</data>
|
||||
@ -4566,4 +4610,8 @@
|
||||
<value>Function removed</value>
|
||||
<comment>Announcement used in Graphing Calculator when a function is removed from the function list</comment>
|
||||
</data>
|
||||
<data name="KGFEquationTextBox.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Function Analysis Equation Box</value>
|
||||
<comment>This is the automation name text for the equation box in the function analsis panel</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
@ -18,7 +18,9 @@
|
||||
<converters:BooleanNegationConverter x:Name="BooleanNegationConverter"/>
|
||||
|
||||
<DataTemplate x:Key="VariableDataTemplate" x:DataType="vm:VariableViewModel">
|
||||
<Grid DataContext="{x:Bind}" Tapped="VariableAreaTapped">
|
||||
<Grid AutomationProperties.Name="{x:Bind VariableAutomationName}"
|
||||
DataContext="{x:Bind}"
|
||||
Tapped="VariableAreaTapped">
|
||||
<Grid.Resources>
|
||||
<ResourceDictionary>
|
||||
|
||||
@ -111,6 +113,7 @@
|
||||
Text="="/>
|
||||
|
||||
<TextBox x:Name="ValueTextBox"
|
||||
x:Uid="VariableValueTextBox"
|
||||
Grid.Column="2"
|
||||
Margin="6,0,0,0"
|
||||
Padding="0,10,0,0"
|
||||
@ -128,7 +131,8 @@
|
||||
</TextBox>
|
||||
</Grid>
|
||||
|
||||
<Slider Grid.Column="1"
|
||||
<Slider x:Uid="VariableValueSlider"
|
||||
Grid.Column="1"
|
||||
Margin="8,0,8,-6"
|
||||
VerticalAlignment="Center"
|
||||
DataContext="{x:Bind}"
|
||||
@ -157,6 +161,7 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"/>
|
||||
<TextBox x:Name="MinTextBox"
|
||||
x:Uid="VariableMinTextBox"
|
||||
Grid.Column="1"
|
||||
MaxWidth="18"
|
||||
Padding="2,16,2,2"
|
||||
@ -178,6 +183,7 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"/>
|
||||
<TextBox x:Name="StepTextBox"
|
||||
x:Uid="VariableStepTextBox"
|
||||
Grid.Column="1"
|
||||
MaxWidth="18"
|
||||
Padding="2,16,2,2"
|
||||
@ -198,6 +204,7 @@
|
||||
VerticalAlignment="Center"
|
||||
FontSize="11"/>
|
||||
<TextBox x:Name="MaxTextBox"
|
||||
x:Uid="VariableMaxTextBox"
|
||||
Grid.Column="1"
|
||||
MaxWidth="18"
|
||||
Padding="2,16,2,2"
|
||||
@ -803,9 +810,10 @@
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<StackPanel x:Uid="EquationInputPanel">
|
||||
<!-- This ListView and the one below should be replacted by an ItemRepeater once https://github.com/microsoft/microsoft-ui-xaml/issues/2011 is fixed. -->
|
||||
<ListView x:Name="EquationInputList"
|
||||
x:Uid="EquationInputList"
|
||||
IsItemClickEnabled="False"
|
||||
ItemsSource="{x:Bind Equations}"
|
||||
SelectionMode="None"
|
||||
@ -868,7 +876,8 @@
|
||||
<Rectangle Height="1"
|
||||
Margin="12"
|
||||
Fill="{ThemeResource DividerBrush}"/>
|
||||
<ListView IsItemClickEnabled="False"
|
||||
<ListView x:Uid="VariableListView"
|
||||
IsItemClickEnabled="False"
|
||||
ItemTemplate="{StaticResource VariableDataTemplate}"
|
||||
ItemsSource="{x:Bind Variables, Mode=OneWay}"
|
||||
SelectionMode="None"
|
||||
|
@ -253,7 +253,8 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<controls:MathRichEditBox Grid.Column="1"
|
||||
<controls:MathRichEditBox x:Uid="KGFEquationTextBox"
|
||||
Grid.Column="1"
|
||||
Padding="10,0,6,0"
|
||||
VerticalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
|
Loading…
Reference in New Issue
Block a user