electron icon indicating copy to clipboard operation
electron copied to clipboard

[Bug]: Accelerators on dialogs button doesn't underline the key

Open rdelhaise-wiiisdom opened this issue 1 year ago • 2 comments

Preflight Checklist

Electron Version

27.0.0

What operating system are you using?

Windows

Operating System Version

Windows 10 Pro Version 21H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Dialog buttons with accelerator underlines the accelerator key on Windows.

Example of expected Behavior:

Actual Behavior

Without Electron Fiddle

The dialogue buttons has the accelerator key but sometimes do not highlight the required key.

Current Dialog :

In those cases the application has to be restarted (potentially multiple times) for the accelerator key to be highlighted.

With Electron Fiddle

The dialogue buttons include the accelerator key but never highlight the required key.

Testcase Gist URL

https://gist.github.com/bcab636e5c73a9c86aebe44449673a04

Additional Information

According to the documentation, on Windows, Electron automatically adds a shortcut and a specific style to common buttons (like "Cancel" or "Yes"). On Fiddle, even common buttons are not highlighted.

rdelhaise-wiiisdom avatar Jan 18 '24 08:01 rdelhaise-wiiisdom

@rdelhaise-wiiisdom This may be a computer settings issue rather than an Electron issue. In your Settings menu of your computer, under Accessibility > Keyboard check to see if the option "Underline access keys" is on. If it was off, you should be able to turn it on and now be able to see the access keys underlined in your test. When the option is off, you should also be able to see the access keys underlined by pressing the Alt button.

Was your issue resolved by turning this option on?

mlaurencin avatar May 01 '24 20:05 mlaurencin

Hello,

Thank you for your response! I will test it and I'll get back to you!

rdelhaise-wiiisdom avatar May 02 '24 08:05 rdelhaise-wiiisdom