-
Notifications
You must be signed in to change notification settings - Fork 738
Fix NVDA accessibility: Theme menu items not announcing selection state #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…o theme MenuItems Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com>
<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}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add this to the _Authentication
menu items and the _Experimental
menu items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
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:
|
Copilot Post-Mortem:
|
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.xaml
were using theIsChecked
binding 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.