Skip to content

Fix Listview names for the narrator#796

Open
amarinov-msft wants to merge 2 commits into
microsoft:mainfrom
amarinov-msft:amarinov/listview-narrator-name
Open

Fix Listview names for the narrator#796
amarinov-msft wants to merge 2 commits into
microsoft:mainfrom
amarinov-msft:amarinov/listview-narrator-name

Conversation

@amarinov-msft

@amarinov-msft amarinov-msft commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary
Fixes an accessibility issue on the WPF Gallery Collections ListView page. In the first example, the item template renders only the person's Name, but Narrator also announces extra, unnecessary information, including the Company - flagged under MAS 1.3.1 - Info and Relationships and Trap 1.4 - Uncomprehended Element.

Change
Sample Applications/WPFGallery/Views/Collections/ListViewPage.xaml
Added an ItemContainerStyle on the first ListView that sets AutomationProperties.Name="{Binding Name, Mode=OneWay}" on each ListViewItem. An explicit accessible name on the container takes precedence over the  ToString() fallback, so the item's name matches its visible content. Scoped to this example only; the other examples on the page are unchanged.

Result
Under Narrator scan mode, each item in the Basic ListView now announces only the person's name, matching what is displayed on screen. The leaked record fields (including Company) are no longer announced, satisfying MAS 1.3.1. Visual appearance is unchanged.

Testing

  • Built WPFGallery.csproj (0 errors).
  • Verified with a screen reader that the Basic ListView items announce only the Name, with no extra field/company information.

amarinov-msft and others added 2 commits July 13, 2026 12:14
…1.4.10)

Typography, Spacing and Geometry pages showed both horizontal and vertical scrollbars in reflow mode because their reference tables used fixed-width Grid columns and the images used fixed sizes, forcing content wider than the viewport. Disable horizontal scrolling and make the tables reflow via proportional (star) column widths capped with MaxWidth, and let the images scale down (and wrap, on Spacing) so content fits within the available width and only a single vertical scrollbar is needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Basic ListView item template shows only Name, but the item's
accessible name fell back to the Person record's ToString(), which
dumps every field (including Company). Narrator therefore announced
extra, unnecessary information beyond the visible Name.

Set AutomationProperties.Name to the bound Name via ItemContainerStyle
so the item's accessible name matches the visible content (MAS 1.3.1).

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