Fix WPF Gallery Narrator accessibility issues (Colors, Icons, User Dashboard)#788
Open
wnvko-msft wants to merge 3 commits into
Open
Fix WPF Gallery Narrator accessibility issues (Colors, Icons, User Dashboard)#788wnvko-msft wants to merge 3 commits into
wnvko-msft wants to merge 3 commits into
Conversation
….3.1) The icon detail values (name, Unicode point, glyphs, XAML) were rendered by a TextBlock inside a ControlTemplate. TextBlockAutomationPeer marks such a TextBlock as non-content (template chrome), so Narrator scan mode could not reach the values. Replace the IconData ControlTemplate with a reusable IconDataField UserControl that presents the value via a real TextBlock in the control's content tree, making it visible to UI Automation. The control also exposes an accessible Copy button that announces completion to Narrator.
The Age slider used a static AutomationProperties.Name ("Age"), so on focus Narrator announced only the slider's range percentage and never the selected age. Bind the slider's AutomationProperties.Name to the current age so Narrator announces "Age N years" on focus, conveying the actual value.
Note: WPF's Slider always exposes the RangeValue pattern, so Narrator may still append the percentage after the name - there's no built-in way to suppress it without a custom automation peer.
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.
Fixes three Narrator/screen-reader accessibility issues in WPF Gallery.
Closes #3019253, #3019506 and #3019515.
Colors page - selector ComboBox silent (3019253, WCAG 4.1.2)
Narrator stayed silent when arrowing through the Colors page selector. A collapsed
ComboBoxthat was never opened has no realized item containers, so WPF raises no UI Automation selection event. The page now realizes the containers on load and items are exposed withAutomationProperties.Name, so Narrator announces the selected item.Icons page - data values unreachable in scan mode (3019506, MAS 1.3.1)
The icon detail values (name, Unicode point, glyphs, XAML) were rendered by
TextBlocksinside aControlTemplate, which UI Automation treats as chrome, so Narrator scan mode skipped them. Replaced the template with a reusableIconDataFieldUserControlthat shows the value via a realTextBlock(exposed as content) and offers an accessible Copy button that announces completion.User Dashboard - Age slider announces percentage (3019515, MAS 1.3.1)
The Age slider used a static name ("Age"), so Narrator read only the range percentage. Its
AutomationProperties.Nameis now bound to the current age, so focus announces, "Age N years". (Slider'sRangeValuepercentage is built in and cannot be suppressed without a custom peer).Microsoft Reviewers: Open in CodeFlow