Skip to content

Fix Hyperlink UIA Name including control type on Text page#779

Open
mmanolova-msft wants to merge 1 commit into
microsoft:mainfrom
mmanolova-msft:user/mmanolova/hyperlink-a11y-name
Open

Fix Hyperlink UIA Name including control type on Text page#779
mmanolova-msft wants to merge 1 commit into
microsoft:mainfrom
mmanolova-msft:user/mmanolova/hyperlink-a11y-name

Conversation

@mmanolova-msft

@mmanolova-msft mmanolova-msft commented Jun 25, 2026

Copy link
Copy Markdown

Summary

Fixes an accessibility issue on the Text → Hyperlink page in WPF Gallery. The sample Hyperlink used the visible text Hyperlink, so its UI Automation Name matched its LocalizedControlType (hyperlink). This violates WCAG/MAS 4.1.2 (Name, Role, Value) and is flagged by Accessibility Insights as "The Name property must not include the element's control type."

Change

  • Sample Applications/WPFGallery/Views/Text/HyperlinkPage.xaml: change the link text from Hyperlink to Microsoft (its navigation target), so the Name is meaningful and no longer repeats the control type. The displayed XamlCode snippet is updated to match the live control.

Result

  • Screen readers now announce "Microsoft, hyperlink" instead of "Hyperlink, hyperlink".
  • Accessibility Insights automated check passes.

Testing

  • Built WPFGallery.csproj (0 errors).
  • Verified in Accessibility Insights (Test tab) that the 4.1.2 failure on the Hyperlink is resolved.
Microsoft Reviewers: Open in CodeFlow

The Hyperlink sample on the Text > Hyperlink page used 'Hyperlink' as its
visible text, so its UI Automation Name matched its LocalizedControlType,
violating WCAG/MAS 4.1.2 (Name, Role, Value). Change the link text to
'Microsoft' (its navigation target) so the Name is meaningful and no longer
repeats the control type. Also update the displayed XamlCode snippet to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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