Skip to content

Fix 2D scrolling on Design Guidance pages at reflow dimensions (WCAG …#795

Open
amarinov-msft wants to merge 1 commit into
microsoft:mainfrom
amarinov-msft:amarinov/designguidance-reflow
Open

Fix 2D scrolling on Design Guidance pages at reflow dimensions (WCAG …#795
amarinov-msft wants to merge 1 commit into
microsoft:mainfrom
amarinov-msft:amarinov/designguidance-reflow

Conversation

@amarinov-msft

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

Copy link
Copy Markdown
Contributor

Summary
Fixes an accessibility issue in the WPF Gallery Design Guidance pages. On the Typography, Spacing, and Geometry pages, both a horizontal and a vertical scrollbar appear at reflow dimensions, so users must scroll in two directions to reach all content. This fails WCAG 2.1 SC 1.4.10 (Reflow) / MAS 1.4.10, which requires content to be usable without scrolling in two dimensions, and is a physical-challenge trap (Trap 2.1) for low-vision and motor-impaired users. The cause is that each page's reference table uses fixed-width Grid  columns and the example images use fixed sizes, forcing content wider than the viewport inside a ScrollViewer with HorizontalScrollBarVisibility="Auto".

Change
Sample Applications/WPFGallery/Views/DesignGuidance/TypographyPage.xaml
Disable horizontal scrolling on the ScrollViewer. Convert the type-ramp table's fixed column widths to proportional star widths so the table reflows, and cap it with MaxWidth (left-aligned) so the normal wide-window appearance is unchanged.

Sample Applications/WPFGallery/Views/DesignGuidance/SpacingPage.xaml
Disable horizontal scrolling. Star-size the spacing table's usage column and cap the table with MaxWidth. Change the two side-by-side example images from a horizontal StackPanel to a WrapPanel with bounded, scalable cards so they scale down and stack vertically when the window is narrow.

Sample Applications/WPFGallery/Views/DesignGuidance/GeometryPage.xaml
Disable horizontal scrolling. Star-size the corner-radius table's usage column and make the example image responsive so it scales down instead of forcing width.

Result
At reflow dimensions the three pages now present a single vertical scrollbar; the tables' columns compress and their text wraps, and the images scale down (and stack, on Spacing), so all content is reachable without horizontal scrolling. At normal window sizes the layout and proportions are unchanged.

Testing

  • Built WPFGallery.csproj (0 errors).
  • Verified the Typography, Spacing, and Geometry pages at reflow dimensions (nav pane collapsed, narrow window): only the vertical scrollbar is shown, and no content is clipped or lost.
Microsoft Reviewers: Open in CodeFlow

…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>
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