Skip to content
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

Accessibility issue: Electron system tray context menu on Windows is not keyboard navigable #11587

Closed
josimi opened this issue Jan 8, 2018 · 10 comments · Fixed by #23843 or #24097
Closed

Comments

@josimi
Copy link
Contributor

josimi commented Jan 8, 2018

  • Electron version: 1.7.10
  • Operating system: Windows 10

Expected behavior

It is possible to access system tray items and their respective context menus on Windows using the keyboard only. This functionality is important for accessibility reasons.

The system tray is selected using the key combination WINDOWS+B and then opened using the ENTER key. It is then possible to navigate to a specific icon using the arrow keys and select it with ENTER to open the icon's context menu. It should be possible to then navigate through this menu using the arrow keys and select a specific item with ENTER.

Actual behavior

Arrow key navigation and ENTER selection is not available for Electron apps' system tray icon context menus. Pressing the arrow keys while the system tray icon's context menu is open, after being opened using the keyboard steps above, produces no result.

How to reproduce

  1. WINDOWS+B and then ENTER to open the list of icons
  2. Arrow keys and to select the Electron app's icon
  3. Press SHIFT+F-10 to open the icon's context menu
  4. Observe that arrow keys are not useable within this icon's menu, but are for other icons.

Technical details

See notify_icon.cc's function NotifyIcon::PopUpContextMenu which makes a call to the ->RunMenuAt. I am new to the Electron codebase, but as far as I can tell, this is RunMenuAt call is defined in Chromium, meaning we can't change it directly, but will need to find another way to show context menus that is keyboard accessible.

@josimi josimi changed the title Accessibility issue: Electron system tray context menu on Windows is not keyboard navigatable Accessibility issue: Electron system tray context menu on Windows is not keyboard navigable Jan 8, 2018
@josimi
Copy link
Contributor Author

josimi commented Jan 8, 2018

Looks like the missing key press handling functionality should be in Chromium's /ui/views/controls/menu/menu_controller.cc.

@brentgti
Copy link

Did regression occur with this? I created an application with a tray menu, and I can't navigate it with the arrow keys on my keyboard. My code is here: https://github.com/brentgti/electron-Teams-links.

@brentgti
Copy link

brentgti commented Nov 21, 2019

@josimi, @brenca:

Is this issue actually fixed, or maybe there's a regression issue here? My tray menu doesn't allow for navigation via keyboard. See https://github.com/brentgti/electron-Teams-links.

@danikane
Copy link

danikane commented Dec 7, 2019

I second that. Can't navigate with the keyboard.

  • Electron v7.0.1
  • electron-builder 21.2.0

@danikane
Copy link

Update:
Upgraded to Electron v8.1.1 and electron-builder 22.4.1, same behavior.
Thanks!

@brentgti
Copy link

brentgti commented Jun 1, 2020

I still can't navigate the menu in my application with the arrow keys. I'm using electron 9.0.0. Others have referred to an electron-builder version, but I don't know about that. I'm using electron-packager to create my .exe.

@danikane
Copy link

danikane commented Jun 1, 2020

The fix was merged just 3 days ago, man...
Wait for a new release.

@brentgti
Copy link

brentgti commented Jun 1, 2020

Sorry, I forgot how these things work 😳. Thanks for the reply.

@danikane
Copy link

danikane commented Jun 8, 2020

@ckerr
Copy link
Member

ckerr commented Jun 11, 2020

Reopening this issue since the previous fix had unintended side-effects.

@ckerr ckerr reopened this Jun 11, 2020
@ckerr ckerr moved this from Done to Active in Issues Jun 11, 2020
@ckerr ckerr moved this from Active to In Flight in Issues Jun 16, 2020
@codebytere codebytere moved this from PR in Flight to Merged in Electron in Issues Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment