mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: Improve accessibility of menus (#15302)
* refactor: improve menubar keyboard accessibility * fix: create a temporary widget for tray icon context menu * fix: focus menu bar with Alt when autohide is off * fix: make menu bar focus work more like the native menus * fix: only focus menu bar if it's not already focused * fix: track accelerator registration to avoid duplicates * docs: add docs for & notation in app menu item names * fix: only try to activate accelerator if it's registered * fix: add friend to monitor window focus change * style: add <memory> include
This commit is contained in:
committed by
Charles Kerr
parent
00daff6ac8
commit
894ae1b3f5
@@ -19,6 +19,12 @@ The `menu` class has the following static methods:
|
||||
Sets `menu` as the application menu on macOS. On Windows and Linux, the
|
||||
`menu` will be set as each window's top menu.
|
||||
|
||||
Also on Windows and Linux, you can use a `&` in the top-level item name to
|
||||
indicate which letter should get a generated accelerator. For example, using
|
||||
`&File` for the file menu would result in a generated `Alt-F` accelerator that
|
||||
opens the associated menu. The indicated character in the button label gets an
|
||||
underline. The `&` character is not displayed on the button label.
|
||||
|
||||
Passing `null` will remove the menu bar on Windows and Linux but has no
|
||||
effect on macOS.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user