musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.2k stars 2.64k forks source link

[MU4 Issue] apersands in items under Publish tab, non accesible by keyboard #13295

Closed sammik closed 2 years ago

sammik commented 2 years ago

Describe the bug In Publish tab, thereare ampersands in items - Pu&blish to ..., &Export...

To Reproduce Steps to reproduce the behavior:

  1. Click "Publish" tab
  2. See items
  3. try to navigate with keyboard

Expected behavior Underlined letter, accesible by "Alt" (or letter)

Screenshots apersands

Platform information

wizofaus commented 2 years ago

Odd that I do see the same for "Publish" but not for "Export" (in the code there's no & before Export).

bkunda commented 2 years ago

The dreaded ampersand has also managed to work it's way into the "Print" button as well...

Screenshot 2022-10-05 at 5 11 45 pm

@Tantacrul FYI @RomanPudashkin if it's at all possible, we'd really like to get this fixed before Beta goes out. Let us know what you think!

Tantacrul commented 2 years ago

Yes. It's particularly problematic that the 'P&ublish to MuseScore.com' button has this problem. We'll get a handful of grief for that :)

cbjeukendrup commented 2 years ago

Can't we just get rid of those ampersands and mnemonics? They keep being problematic forever. Anyway, we probably can't, otherwise people will start complaining...

The reason that they popup everywhere, is that we define the "title" of an action globally. So the same string will be used for the menu bar, for the toolbars and any other place where we use that action. For the menu bar, the string needs to contain the ampersand, so that will appear in all other places too.

So what is the desired solution? Of course, we can process each string to remove the ampersand before displaying it, but is that not bad for performance?

Another issue is that there is not a very clear distinction between strings where translators can and can't add ampersands. (A translation may namely have ampersands where English can't have it, because in English all letters might be used within a menu but in other languages there might be a free letter left.) Ideally we'd put strings that can have ampersands in a separate context, so that we can easily label them on Transifex to make them distinguishable, and also so that they won't collide with strings that should not contain ampersands. We could still do that even though we're in string freeze mode, since if you change the context of a string, Transifex will automatically fill in the existing translation for the new string in the new context. This way, the problem won't be fixed automatically (since the old translations will simply be copied), but at least translators have the possibility to fix it themselves. Do we want to do this?

Tantacrul commented 2 years ago

I am very suspicious about the actual value of these Mnemonics. Do we have them in version 3?

They not only keep causing annoying problems but they uglify the interface for the Windows version too.

cbjeukendrup commented 2 years ago

Do we have them in version 3?

Yes, and any app that uses Qt's menu bar has them, but we use our own menu bar but are still trying to recreate those mnemonics in the way Qt does it.

I also think that mnemonics is a totally useless concept:

cbjeukendrup commented 2 years ago

Another issue with mnemonics: on macOS, they appear in 'our' (non-native) context menus, even though they are not (meant to be) functional on macOS anyway.

Tantacrul commented 2 years ago

@shoogle - what do you think about this? What is the advantage of Mnemonics? It strikes me as very outdated and it keeps causing weird issues. However, I can't claim to be an expert on them.

MarcSabatella commented 2 years ago

In theory, screen readers can announce mnemonics (I haven’t checked to see it that happens currently in MU4 for any specific screen reader). Blind users also can learn them from the documentation. Since they can be operated with one hand, they are also useful for people with motor disability or who simply want to keep one hand on a Braille device - or on a MIDI keyboard, for that matter. They are a pretty fundamental part of how many people interact with computers. Please do not seriously consider eliminating them.

MarcSabatella commented 2 years ago

I just checked with NVDA and Narrator, MU3 reads the mnemonics for the main menu, MU4 does not. Orca does not read for either.

To be clear, the particular method I see used most is Alt+letter to jump directly to a given menu. Then people probably use cursor keys as much as actually learning mnemonics (although I personally do both).

Tantacrul commented 2 years ago

Urg. A separate issue, I guess. @cbjeukendrup, for now let's just fix the present issue with the & symbols in English at least. We can't have people reporting on it thinking it's a typo

Tantacrul commented 2 years ago

We'll just stick with mnemonics for now (possibly for good) and address their annoyances later

MarcSabatella commented 2 years ago

FWIW, I'd be really surprised if there is a measurable performance penalty for stripping out the ampersand, any more than there is for the usual thing of turning it into an underline (what most UI libraries do automatically). Right now we're doing this fancy thing of stripping it out in the main menu and then converting to underline after you press Alt, which does look nice. But everywhere else (individual menu items, tabs, buttons, etc) I'd expect to just see the underlines.

wizofaus commented 2 years ago

@shoogle - what do you think about this? What is the advantage of Mnemonics? It strikes me as very outdated and it keeps causing weird issues. However, I can't claim to be an expert on them.

What about them is "outdated" - people still use keyboards! They've always been somewhat of a niche use (visually impaired users, power users etc.), but unless can define and then memorize shortcuts defined for every possible command (which is more difficult now that shortcut sequences can only be defined by editing the xml file rather than via the UI), they definitely serve a purpose. Having said that, if just being able to use the first letter of command (on a button or menu item) to move the focus to the next command starting with that letter is implemented, it could work just as well - though I'm not sure how it works for non-roman-alphabet languages (Japanese/Chinese etc.).

MarcSabatella commented 2 years ago

One other thing - the idea of a command search where you type the first couple letter of any command to access it directly - that's something specifically mentioned by a couple of blind users @shoogle and I met with recently. So yeah, long term, a good implementation of that idea would be great, and could perhaps replace mnemonics. But, use of mnemonic accelerators is a pretty baked-in concept in virtually every window manager or GUI library I've ever used, going back to the 1980's. Admittedly, I have extremely little macOS experience, and I understand Apple has been phasing these out over the last few years. So no doubt other patterns are possible.

cbjeukendrup commented 2 years ago

We'll just stick with mnemonics for now (possibly for good) and address their annoyances later

Okay. Working on it.