Skip to content

Fix WPF Gallery Narrator accessibility issues (Colors, Icons, User Dashboard)#788

Open
wnvko-msft wants to merge 3 commits into
microsoft:mainfrom
wnvko-msft:mvenkov/fix-wpfgallery-a11y
Open

Fix WPF Gallery Narrator accessibility issues (Colors, Icons, User Dashboard)#788
wnvko-msft wants to merge 3 commits into
microsoft:mainfrom
wnvko-msft:mvenkov/fix-wpfgallery-a11y

Conversation

@wnvko-msft

@wnvko-msft wnvko-msft commented Jun 29, 2026

Copy link
Copy Markdown

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 ComboBox that 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 with AutomationProperties.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 TextBlocks inside a ControlTemplate, which UI Automation treats as chrome, so Narrator scan mode skipped them. Replaced the template with a reusable IconDataField UserControl that shows the value via a real TextBlock (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.Name is now bound to the current age, so focus announces, "Age N years". (Slider's RangeValue percentage is built in and cannot be suppressed without a custom peer).

Microsoft Reviewers: Open in CodeFlow

….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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant