Fix Code Related PT Run Accessibility issues (#5610)

* set the name automation properties for the result elements

* Added name properties to search box

* removed the name for the grid

* localized the automation property names of the launcher control

* Localized the automation name property for the result list

* Uncommented out the Hide() function which was commented out to run Accessibility Insights

* modified resources from static to dynamic

* reverted access modifier to internal as we are no longer using this

* updated csproj file
This commit is contained in:
Alekhya
2020-08-05 13:43:47 -07:00
committed by GitHub
parent 4b72b291ef
commit 30b65028fe
22 changed files with 248 additions and 13 deletions

View File

@@ -160,13 +160,14 @@
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectionMode="Single"
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
ItemContainerStyle="{StaticResource ResultsListViewItemContainerStyle}">
ItemContainerStyle="{StaticResource ResultsListViewItemContainerStyle}"
AutomationProperties.Name="{DynamicResource Results}">
<!--AllowFocusOnInteraction="False"
IsItemClickEnabled="True"-->
<!--Style="{StaticResource ListViewNoAnimations}"-->
<ListView.ItemTemplate>
<DataTemplate >
<DataTemplate>
<Grid
Height="72"
Width="642"
@@ -207,10 +208,11 @@
</StackPanel>
</ToolTip>
</Grid.ToolTip>
<Image x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-6,-2,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
<TextBlock x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom"/>
<TextBlock x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextForeground}" Margin="0,2,0,0" VerticalAlignment="Top"/>
<ListView
<Image AutomationProperties.Name="{DynamicResource AppIcon}" x:Name="AppIcon" Height="36" MaxWidth="56" Grid.RowSpan="2" Margin="-6,-2,0,0" HorizontalAlignment="Center" Source="{Binding Image}" />
<TextBlock AutomationProperties.Name="{DynamicResource Title}" x:Name="Title" Grid.Column="1" Text="{Binding Result.Title}" FontWeight="SemiBold" FontSize="20" Margin="0,0,0,-2" VerticalAlignment="Bottom"/>
<TextBlock AutomationProperties.Name="{DynamicResource Subtitle}" x:Name="Path" Grid.Column="1" Text= "{Binding Result.SubTitle}" Grid.Row="1" Foreground="{DynamicResource SecondaryTextForeground}" Margin="0,2,0,0" VerticalAlignment="Top"/>
<ListView
AutomationProperties.Name="{DynamicResource ContextMenuItemsCollection}"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="Transparent"
@@ -234,14 +236,14 @@
</ItemsControl.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Button Style="{StaticResource IconButtonStyle}" Command="{Binding Command}" VerticalAlignment="Center" Height="42" Width="42" BorderThickness="1" >
<Button AutomationProperties.Name="{DynamicResource ContextMenuItem}" Style="{StaticResource IconButtonStyle}" Command="{Binding Command}" VerticalAlignment="Center" Height="42" Width="42" BorderThickness="1" >
<ToolTipService.ToolTip>
<ToolTip >
<TextBlock Text="{Binding Title}" Foreground="{DynamicResource ToolTipForegroundBrushKey}" Margin="8,5" FontSize="12"/>
<TextBlock AutomationProperties.Name="{DynamicResource ContextMenuItemAdditionalInformation}" Text="{Binding Title}" Foreground="{DynamicResource ToolTipForegroundBrushKey}" Margin="8,5" FontSize="12"/>
</ToolTip>
</ToolTipService.ToolTip>
<Button.Content>
<TextBlock FontFamily="{Binding FontFamily}" FontSize="16" Text="{Binding Glyph}"/>
<TextBlock AutomationProperties.Name="{DynamicResource ContextMenuIcon}" FontFamily="{Binding FontFamily}" FontSize="16" Text="{Binding Glyph}"/>
</Button.Content>
</Button>
</DataTemplate>