Open Bug 1737402 Opened 3 years ago Updated 3 years ago

Context menu shortcuts not working when switching Windows language

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 94
defect

Tracking

()

UNCONFIRMED

People

(Reporter: rezamoradix, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

Change Windows language from English to another language like Persian
Right click on a link
Hit L to copy link

Actual results:

Nothing. the shortcut for Copy Link (which is L) is not working

Expected results:

Context menu shortcuts work no matter what is the current language of OS.

The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Internationalization
Product: Firefox → Core

Thank you for your report!

Can you verify if that happens in other locales?

I'm looking at sources and I see:

And in fact Persian has L despite the fact that this letter is not present in the string - https://hg.mozilla.org/l10n-central/fa/file/default/browser/browser/browserContext.ftl#l182

Is it Persian specific bug maybe?

Flags: needinfo?(rezamoradix)

:flod - how does it look to you?

Flags: needinfo?(francesco.lodolo)

I know every language has a unique set of shortcuts based of their letters. The problem is that when you are using, for example English version of Firefox and you change your keyboard language (I said Windows language but I mean typing language, not language of whole OS) to a non-Latin language (for example Persian) that its shortcuts are based on its alphabet, and then you right click on a link and hit "L" on your keyboard to trigger "Copy Link", But since you have changed your keyboard language, the key that Firefox think you just pressed is "م" which is in the same place that "L" is on QWERTY layout.

The shortcut system in Firefox works based on the character that you are pressing not its location on keyboard layout.
According to https://hg.mozilla.org/l10n-central/fa/file/default/browser/browser/browserContext.ftl, if I want to open a link in new tab by using shortcuts, I have to switch my keyboard language to Persian and the hit "ز" and then for copying that link I have to switch back to English and then hit "L". In fact Firefox should trigger the shortcuts based on the location of pressed keys on keyboard, no matter what the current keyboard language is, so then when you press the key on your keyboard that is "T" in English QWERTY, "ف" in Persian QWERTY in "τ" in Greek QWERTY, Firefox will know that you want to open the link in new tab.

I checked other locales like Greek, they are the same.

Flags: needinfo?(rezamoradix)

(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #2)

Is it Persian specific bug maybe?

Not necessarily, some locales with non Latin script decide to not localize access keys (plenty of Hindic locales for example).

Given the last comment, this is more about keyboard layouts than localization. Indeed, it's a bit surprising that a shortcut CTRL+T would work with the Persian layout, but the access key doesn't get triggered.

Flags: needinfo?(francesco.lodolo)

Given the last comment, this is more about keyboard layouts than localization. Indeed, it's a bit surprising that a shortcut CTRL+T would work with the Persian layout, but the access key doesn't get triggered.

I am not super familiar with the DOM accesskeys but my read is that it is either:

  • according to the spec, in which case it's an L10n bug
  • or it's a bug in our implementation of access keys, in which case it is a DOM bug

Can you help me reason about which component to move it to?

Flags: needinfo?(francesco.lodolo)

(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #6)

Given the last comment, this is more about keyboard layouts than localization. Indeed, it's a bit surprising that a shortcut CTRL+T would work with the Persian layout, but the access key doesn't get triggered.

I am not super familiar with the DOM accesskeys but my read is that it is either:

  • according to the spec, in which case it's an L10n bug
  • or it's a bug in our implementation of access keys, in which case it is a DOM bug

It's not an l10n bug for sure. To be be clear, the user is saying:

  • I have Persian layout.
  • The accesskey displayed is "L", I press the "L" character but it doesn't work (obviously, since they're using a Persian layout, the character produced won't be "L" but something else).
  • This same bug would happen with English build and Persian layout.

There is also a chance that it's a WONTFIX, because access keys might be designed to work on the character and not the key. I would move it to DOM to see what their take is.

Flags: needinfo?(francesco.lodolo)

trying!

Component: Internationalization → DOM: UI Events & Focus Handling
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.