Add accessible name to C# code copy button (fix private Unicode Name)#786
Open
mmanolova-msft wants to merge 1 commit into
Open
Add accessible name to C# code copy button (fix private Unicode Name)#786mmanolova-msft wants to merge 1 commit into
mmanolova-msft wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The C# "Source code" copy button in ControlExample had no AutomationProperties.Name. Because the button's content is only a Segoe Fluent icon glyph ( , U+E8C8), WPF derived the button's UI Automation Name from that glyph, which falls in the Unicode Private Use Area (U+E000–U+F8FF). Accessibility Insights / screen readers flag this as a violation of MAS 4.1.2 – Name, Role, Value.
The sibling XAML copy button already sets
AutomationProperties.Name="Copy XAML Code"; this change applies the same treatment to the C# copy button.Change
AutomationProperties.Name="Copy C# Code"(and a matchingCopy to clipboardtooltip) to the C# code copy button.Repro (before fix)
Fixes AzDO DevDiv#3018313.
Microsoft Reviewers: Open in CodeFlow