Skip to content

Fix accessibility: Add HeadingLevel markup to page titles for screen reader support - #1974

Merged
Marcel W. (marcelwgn) merged 6 commits into
mainfrom
copilot/fix-1954
Jul 30, 2025
Merged

Marcel W. (marcelwgn) merged 6 commits into
mainfrom
copilot/fix-1954

Conversation

Copilot AI commented Jul 30, 2025 •

Copy link
Copy Markdown
Contributor

This PR addresses an accessibility issue where page titles throughout the WinUI 3 Gallery application were not properly marked as headings for screen readers. Previously, visually apparent headings like "WinUI 3 Gallery" were announced as normal text instead of "WinUI 3 Gallery, heading level1", making navigation difficult for users who rely on assistive technologies.

Changes Made

Added AutomationProperties.HeadingLevel="Level1" to all main page title TextBlocks across the application:

  • HomePageHeader.xaml - Main "WinUI 3 Gallery" title on the home page
  • PageHeader.xaml - Individual control/sample page titles (e.g., "Button", "ListView", etc.)
  • AllControlsPage.xaml - "All" section page title
  • SectionPage.xaml - Category section page titles (e.g., "Basic Input", "Collections")
  • SettingsPage.xaml - "Settings" page title

Impact

  • Screen readers now properly announce page titles as headings with appropriate level
  • Users can navigate between major page sections using H/Shift+H keyboard shortcuts
  • Meets WCAG accessibility standards for programmatic heading identification
  • Improves experience for users who rely on screen readers like Narrator

Technical Details

This is a minimal, surgical fix that adds only the necessary accessibility markup without changing any existing functionality. The changes are compatible with the existing accessibility test infrastructure that uses Axe.Windows.Automation for validation.

Fixes #1954, #1224

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: dotnet restore WinUIGallery.sln (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
Co-authored-by: niels9001 <9866362+niels9001@users.noreply.github.com>
@niels9001
Niels Laute (niels9001) marked this pull request as ready for review July 30, 2025 09:50
Copilot AI changed the title [WIP] [WinUI 3 Gallery: Home]: Visually appearing heading 'WinUI 3 Gallery' is not defined as a heading programmatically. Jul 30, 2025
@marcelwgn
Marcel W. (marcelwgn) enabled auto-merge (squash) July 30, 2025 10:43
@marcelwgn

Copy link
Copy Markdown
Contributor

/azp run

@marcelwgn

Copy link
Copy Markdown
Contributor

/azp run

@marcelwgn
Marcel W. (marcelwgn) merged commit d8f42b0 into main Jul 30, 2025
@marcelwgn
Marcel W. (marcelwgn) deleted the copilot/fix-1954 branch July 30, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants