Accessibility Bug Fix: After selecting from the navigation list, keyboard focus is not transferred to page content #14289
Merged
ssparach merged 6 commits intoFeb 26, 2026
Conversation
Contributor
There was a problem hiding this comment.
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
LostFocushandler on the settings shell’sNavigationFrameto 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. |
…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>
Member
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
benhillis
approved these changes
Feb 26, 2026
Member
benhillis
left a comment
There was a problem hiding this comment.
LGTM! Thanks for fixing this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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: