Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu Navigation not working with Left/Right arrows (behave like Up/Down arrows) #19987

Closed
jmwmusic opened this issue Nov 10, 2023 · 15 comments · Fixed by #20191
Closed

Menu Navigation not working with Left/Right arrows (behave like Up/Down arrows) #19987

jmwmusic opened this issue Nov 10, 2023 · 15 comments · Fixed by #20191
Assignees
Labels
accessibility Issues related to accessibility P1 Priority: High regression MS3 Regression from MS3 (3.6.2) UI Visual issues affecting the UI (not notation)

Comments

@jmwmusic
Copy link

Issue type

UI bug

Bug description

When using keyboard navigation in menus the left/right arrows do not open the next menu.

Steps to reproduce

  1. Press Alt F to open the file menu.
  2. press a few down arrows to an option that does not have an expand (e.g. not open recent).
  3. Press right arrow.
    Expected behaviur is for it to move focus onto and open the next menu so you should year Edit/Undo. Instead it moves down the next item in the file menu and then gets somewhat stuck.

Screenshots/Screen recordings

No response

MuseScore Version

4.1

Regression

I don't know

Operating system

Window 10 with NVDA

Additional context

No response

@muse-bot muse-bot added the UI Visual issues affecting the UI (not notation) label Nov 10, 2023
@cbjeukendrup cbjeukendrup added the accessibility Issues related to accessibility label Nov 10, 2023
@github-project-automation github-project-automation bot moved this to Issues to fix in MuseScore Studio 4.3 Nov 10, 2023
@bkunda bkunda added the P1 Priority: High label Nov 10, 2023
@bkunda
Copy link

bkunda commented Nov 10, 2023

@DmitryArefiev pls look at this one

@NinjaNas
Copy link
Contributor

I would like to take this issue but I would need more info about the expected behavior.

For example, when you use right arrow in a submenu on an option that does not have an submenu should it move directly to the next app menu?

@shoogle
Copy link
Contributor

shoogle commented Nov 22, 2023

@NinjaNas, judging by the behaviour of MS Paint and Notepad, no, pressing Right in a submenu should not take you to the next top-level menu. However, it does in Firefox, so I'd say that it doesn't really matter either way. The main thing is that pressing Right in a top-level menu should take you to the next top-level menu.

@shoogle shoogle assigned NinjaNas and unassigned Eism and DmitryArefiev Nov 22, 2023
@NinjaNas
Copy link
Contributor

@shoogle I just tested this out in Notepad and it does take you to the new top-level menu.

Alt + V, then Right Arrow twice should put you into the Zoom submenu and then to the Help menu.

I personally think it should go to the next top-level menu, otherwise Right Arrow has the the same functionality has Down Arrow in this case.

@shoogle
Copy link
Contributor

shoogle commented Nov 22, 2023

@NinjaNas, I'm on Windows 11 and my Notepad doesn't have a Help menu. Maybe you're on Windows 10 or using Notepad++?

Anyway, in Notepad on Windows 11 the Right arrow key behaves as I described (i.e. it does nothing in submenus), though like I said before, I don't have a problem with it putting you on the next menu.

The Right arrow shouldn't behave like the Down arrow in menus. It should either put you on the next menu or do nothing. It shouldn't put you on the next item in the current menu.

@NinjaNas
Copy link
Contributor

Got it. Also, I am on Windows 10 where the notepad app is different.

@jmwmusic
Copy link
Author

Preference in the accessibility review info I've been given by RNIB (Royal National Institute for the Blind) and also my personal preference would be for right arrow when in a sub menu to as described above jump to the top of the next menu. Otherwise if there are a lot of sub menus in a column it can be hard to find a quick way to move right, having to back out of each sub menu with a left arrow and move down and try to move right again. Screen reader users will be used to this behaviour and not confused by it moving from a sub menu to the top of the next menu. But as peter said the most important thing is that right arrow should only navigate to the right and never down the list and there needs to be a way to move right from menu to menu, otherwise if you can't remember what all the menus are or what the shortcuts are there is no way to browse through them.

@NinjaNas
Copy link
Contributor

Currently, I got the menu to close correctly in StyleMenu.qml, however, I am not sure how to send a signal over to AppMenuBar.qml so I can run a function to jump directly to the next app menu.

If you have any tips or a better suggestion, let me know.

@Eism
Copy link
Contributor

Eism commented Nov 23, 2023

I agree with all the proposed improvements. Another example supporting the navigation to the next menu is that macOS navigation works exactly that way. I also notice that navigation from submenus is also available in macOS, so it would be great to implement this in MuseScore.

@NinjaNas, all navigation logic is stored in the NavigableAppMenuModel class. There shouldn't be any issues with closing all menus when pressing the right/left arrow keys, but I could be mistaken.

@NinjaNas
Copy link
Contributor

There shouldn't be any issues with closing all menus when pressing the right/left arrow keys, but I could be mistaken.

There was an issue with right arrow not closing the menu but that is an easy fix.

From what I can tell /src/framework/uicomponents/qml/MuseScore/UiComponents/internal/StyledMenu.qml contains the code for navigating and closing the dropdown menus. (I think it uses the MenuView class)

/src/appshell/qml/platform/AppMenuBar and NavigableAppMenuModel is responsible for navigating the App Menu and opening the dropdowns.

The problem is when the dropdown menu closes because of a left/right arrow on a non-submenu item, it should also navigate the NavigableAppMenuModel to the next menu and open it.

Currently, my question is what is the best way of doing this as it seems I need the two menus to interact with each other. I'm pretty new to Qt and QML so I was just thinking of trying to pass a signal to NavigableAppMenuModel when the downdown menu closes after left/right arrow (though I don't know where I would put the QObject::connect()).

I wanted to know if I'm headed in the right direction or if I should look for a different solution.

@shoogle
Copy link
Contributor

shoogle commented Nov 24, 2023

@NinjaNas, best thing to do is find any method that works (or nearly works) and then submit a PR. This way we know you're serious about fixing it, and if it's not the right solution we at least have a starting point from which we can point you in the right direction.

NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Nov 25, 2023
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke jumpToNextMenu in the correct direction
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Nov 30, 2023
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Nov 30, 2023
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
@oktophonie oktophonie moved this from Issues to fix to In progress in MuseScore Studio 4.3 Dec 8, 2023
@bkunda bkunda moved this to In progress in MuseScore Studio 4.4 Jan 24, 2024
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Apr 23, 2024
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue May 8, 2024
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Aug 14, 2024
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
@DmitryArefiev DmitryArefiev changed the title Menu Navigation not working with Left/Right arrows Menu Navigation not working with Left/Right arrows (behave like Up/Down arrows) Aug 19, 2024
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Aug 19, 2024
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
NinjaNas added a commit to NinjaNas/MuseScore that referenced this issue Aug 19, 2024
Add a force close upon using Right Arrow on a non-submenu item
Use signals when appropriate to invoke openPrevMenu/openNextMenu
Add hasSiblingMenus property to allow context menus using the StyledMenu class to be closed using left/right arrow key
Eism added a commit that referenced this issue Aug 20, 2024
Fix #19987 Menu Navigation not working with Left/Right arrows
@github-project-automation github-project-automation bot moved this from In progress to Needs porting in MuseScore Studio 4.4 Aug 20, 2024
@DmitryArefiev DmitryArefiev added the regression MS3 Regression from MS3 (3.6.2) label Aug 20, 2024
RomanPudashkin pushed a commit to RomanPudashkin/MuseScore that referenced this issue Aug 20, 2024
Fix musescore#19987 Menu Navigation not working with Left/Right arrows
@RomanPudashkin RomanPudashkin moved this from Needs porting to Done in MuseScore Studio 4.4 Aug 20, 2024
@jmwmusic
Copy link
Author

jmwmusic commented Sep 7, 2024

This is unfortunately not working correctly with NVDA.
Can this be reopened or do I need to add a new issue?

STEPS:

  1. Press Alt F to open File menu, press right arrow. You will hear “Application Menu Panel Edit Button”. You should just hear Edit or the first item in the Edit menu.
  2. Press right arrow twice and you hear “Application Menu Panel Add Button”.
  3. Press Right arrow a third time and you hear “Blank”. Sometimes this carried on saying blank for me with further arrow presses, sometimes it moved on to the next item with a second press.
  4. Press left arrow to move back to the Add menu and then press down arrow, for each press you just hear “blank” instead of the items of that menu. It may be moving down visually and just not announcing, or may not be moving at all, not sure.
  5. Press Esc to return to the score and close menus.
  6. Press Alt F to open File menu and press down arrow several times to for example move down to close.
  7. Press right arrow to move over to the edit menu, again it just says “blank”. Note this is the same thing NVDA says when you press down arrow and move on to an empty line in a document.

@DmitryArefiev
Copy link
Contributor

@jmwmusic Oh I see, it became more serious for NVDA when using new behavior with Left/Right arrows. Please log a separate ticket for "blank" issue with NVDA and assign it to me.

Also, it still works when using previous behavior: when exit from sub-menu list with Esc, navigate through menu group (e.g. from File to Edit), then enter group with Enter or Down arrow and navigate through sub-menu list

The initial PR #20191 fixed only navigation issue (not accessibility part) see #20191 (comment) and #20191 (comment)

I've logged a separate accessibility issue for Narrator and Orca #24151

@NinjaNas
Copy link
Contributor

NinjaNas commented Sep 8, 2024

@DmitryArefiev I already made an issue #22883. Please update if needed!

@DmitryArefiev
Copy link
Contributor

@NinjaNas Oh thanks! I'll just add a case from the comment below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issues related to accessibility P1 Priority: High regression MS3 Regression from MS3 (3.6.2) UI Visual issues affecting the UI (not notation)
Projects
Development

Successfully merging a pull request may close this issue.

8 participants