Skip to content

Accessibility Bug Fix: After selecting from the navigation list, keyboard focus is not transferred to page content #14289

Merged
ssparach merged 6 commits into
microsoft:masterfrom
ssparach:user/ssparach/accessibilityBugFixes
Feb 26, 2026
Merged

Accessibility Bug Fix: After selecting from the navigation list, keyboard focus is not transferred to page content #14289
ssparach merged 6 commits into
microsoft:masterfrom
ssparach:user/ssparach/accessibilityBugFixes

Conversation

@ssparach
Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Problem: After selecting any list item (e.g., File System) in the navigation menu, keyboard focus is not directly shifting to the revealed content.

Changes
Focus redirection on page load: Each settings page's root Grid is now named and marked as a tab stop with
AutomationProperties.LandmarkType="Main". On page load, focus is programmatically set to the page root via Focus(FocusState.Programmatic), ensuring keyboard focus shifts directly to the revealed content.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Additional Change:
Focus return to navigation menu: A LostFocus handler on NavigationFrame in ShellPage.xaml.cs detects when focus escapes the page content back to the NavigationView. When this happens, focus is restored to the currently selected navigation item, allowing the user to continue keyboard navigation from the menu.
Heading-level annotations: Page titles are now marked as Level 1 headings for screen reader landmark navigation.

Validation Steps Performed

Manually tested with the Windows on-screen keyboard:

  • Verified focus shifts directly to page content when selecting a navigation item via keyboard
  • Verified Tab cycles through all page controls and returns focus to the selected menu item

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves keyboard and screen-reader navigation in the WinUI Settings app by ensuring focus moves to the newly displayed page content after selecting a NavigationView item, and by enhancing page semantics for assistive technologies.

Changes:

  • Set programmatic focus to each settings page root on page load to transfer focus into the revealed content.
  • Mark each settings page root as a “Main” landmark and mark page titles as Heading Level 1.
  • Add a LostFocus handler on the settings shell’s NavigationFrame to restore focus to the currently selected navigation item when focus returns to the navigation menu.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/windows/wslsettings/Views/Settings/ShellPage.xaml.cs Adds NavigationFrame.LostFocus handling to restore focus to the selected nav item when focus returns to the NavigationView.
src/windows/wslsettings/Views/Settings/OptionalFeaturesPage.xaml Makes page root focusable + Main landmark; marks title as Heading Level 1.
src/windows/wslsettings/Views/Settings/OptionalFeaturesPage.xaml.cs Sets focus to page root on load.
src/windows/wslsettings/Views/Settings/NetworkingPage.xaml Makes page root focusable + Main landmark; marks title as Heading Level 1.
src/windows/wslsettings/Views/Settings/NetworkingPage.xaml.cs Sets focus to page root on load.
src/windows/wslsettings/Views/Settings/MemAndProcPage.xaml Makes page root focusable + Main landmark; marks title as Heading Level 1.
src/windows/wslsettings/Views/Settings/MemAndProcPage.xaml.cs Sets focus to page root on load.
src/windows/wslsettings/Views/Settings/FileSystemPage.xaml Makes page root focusable + Main landmark; marks title as Heading Level 1.
src/windows/wslsettings/Views/Settings/FileSystemPage.xaml.cs Sets focus to page root on load.
src/windows/wslsettings/Views/Settings/DeveloperPage.xaml Makes page root focusable + Main landmark; marks title as Heading Level 1.
src/windows/wslsettings/Views/Settings/DeveloperPage.xaml.cs Sets focus to page root on load.

Comment thread src/windows/wslsettings/Views/Settings/OptionalFeaturesPage.xaml.cs Outdated
Comment thread src/windows/wslsettings/Views/Settings/NetworkingPage.xaml.cs Outdated
Comment thread src/windows/wslsettings/Views/Settings/MemAndProcPage.xaml.cs Outdated
Comment thread src/windows/wslsettings/Views/Settings/FileSystemPage.xaml.cs Outdated
Comment thread src/windows/wslsettings/Views/Settings/DeveloperPage.xaml.cs Outdated
ssparach and others added 5 commits February 26, 2026 10:29
…ml.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@benhillis
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Member

@benhillis benhillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing this.

@ssparach ssparach merged commit 63fa9f3 into microsoft:master Feb 26, 2026
6 checks passed
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.

3 participants