Skip to content

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

Description

@josimi
  • 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.

Activity

  1. 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[/+] on Jan 8, 2018
  2. josimi commented on Jan 8, 2018

    @josimi
    ContributorAuthor

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

  3. brentgti commented on Nov 14, 2019

    @brentgti

    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.

  4. brentgti commented on Nov 21, 2019

    @brentgti

    @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.

  5. danikane commented on Dec 7, 2019

    @danikane

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

    • Electron v7.0.1
    • electron-builder 21.2.0
  6. 1 remaining item

  7. danikane commented on Mar 12, 2020

    @danikane

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

  8. self-assigned this
    on May 26, 2020
  9. self-assigned this
    on May 29, 2020
  10. brentgti commented on Jun 1, 2020

    @brentgti

    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.

  11. danikane commented on Jun 1, 2020

    @danikane

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

  12. brentgti commented on Jun 1, 2020

    @brentgti

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

  13. ckerr commented on Jun 11, 2020

    @ckerr
    Member

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

  14. reopened this on Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions