Skip to content

Commit 2778df9

Browse files
Add accessible name to C# code copy button in ControlExample (#786)
The C# 'Source code' copy button had no AutomationProperties.Name, so its UI Automation Name was derived from the Segoe icon glyph (U+E8C8), which lies in the Unicode Private Use Area (U+E000-U+F8FF). Screen readers and Accessibility Insights flagged this (MAS 4.1.2). Added AutomationProperties.Name=Copy C# Code and a matching tooltip, mirroring the sibling XAML copy button. Fixes AzDO DevDiv#3018313 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8e4be39 commit 2778df9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sample Applications/WPFGallery/Controls/ControlExample.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
124124
Text="C#" />
125125

126-
<Button Grid.Column="1" Padding="8" Command="ApplicationCommands.Copy" CommandParameter="Copy_CSharpCode" FocusManager.IsFocusScope="True" >
126+
<Button Grid.Column="1" Padding="8" Command="ApplicationCommands.Copy" CommandParameter="Copy_CSharpCode" FocusManager.IsFocusScope="True" ToolTipService.ToolTip="Copy to clipboard" AutomationProperties.Name="Copy C# Code" >
127127
<TextBlock FontFamily="{StaticResource SymbolThemeFontFamily}" Text="&#xE8C8;" />
128128
</Button>
129129
</Grid>

0 commit comments

Comments
 (0)