Fix NVDA accessibility: Theme menu items not announcing selection state#2237
Merged
Fix NVDA accessibility: Theme menu items not announcing selection state#2237
Conversation
…o theme MenuItems Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] NVDA does not announce selected item in Theme tab
Fix NVDA accessibility: Theme menu items not announcing selection state
Jun 13, 2025
brianrob
approved these changes
Jun 13, 2025
| <MenuItem Header="Light" x:Name="Theme_Light" IsChecked="{Binding Path=ThemeViewModel.IsLightTheme}" Command="{x:Static src:ThemeViewModel.SetLightThemeCommand}"/> | ||
| <MenuItem Header="Dark" x:Name="Theme_Dark" IsChecked="{Binding Path=ThemeViewModel.IsDarkTheme}" Command="{x:Static src:ThemeViewModel.SetDarkThemeCommand}"/> | ||
| <MenuItem Header="System" x:Name="Theme_System" IsChecked="{Binding Path=ThemeViewModel.IsSystemTheme}" Command="{x:Static src:ThemeViewModel.SetSystemThemeCommand}"/> | ||
| <MenuItem Header="Light" x:Name="Theme_Light" IsCheckable="True" IsChecked="{Binding Path=ThemeViewModel.IsLightTheme}" Command="{x:Static src:ThemeViewModel.SetLightThemeCommand}"/> |
Member
There was a problem hiding this comment.
Please also add this to the _Authentication menu items and the _Experimental menu items.
Contributor
Author
There was a problem hiding this comment.
Added IsCheckable="True" to all four Authentication menu items that have IsChecked bindings. The Experimental menu items already had IsCheckable="true" so no changes were needed there. The fix ensures screen readers can properly announce the selection state of these checkable menu options. Commit: 14d25d5
Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Member
|
Copilot Post-Mortem:
|
marklio
approved these changes
Jun 19, 2025
leculver
approved these changes
Jun 20, 2025
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.
This PR fixes an accessibility issue where screen readers like NVDA cannot announce the currently selected theme in the Options > Theme menu.
Problem
Screen reader users were unable to determine which theme is currently selected when navigating through the Theme submenu. The selected item (Light, Dark, or System) was not being announced by NVDA, making it difficult for users to confirm their current selection or make informed changes.
Root Cause
The theme MenuItems in
MainWindow.xamlwere using theIsCheckedbinding property to display the selection state visually, but were missing theIsCheckable="True"attribute. Without this attribute, WPF doesn't properly expose the checked state to UI Automation APIs, preventing screen readers from accessing the selection information.Solution
Added
IsCheckable="True"to all three theme MenuItems:Technical Details
The
IsCheckable="True"attribute enables WPF to:This change follows the same pattern already used by other checkable menu options in the same file (lines 122, 127).
Impact
The fix is minimal and surgical, affecting only the three theme MenuItems without changing any underlying functionality.
Fixes #2236.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.