nvda
afc9311a - Handle menu start events processed after the menu item (#12709)

Commit
4 years ago
Handle menu start events processed after the menu item (#12709) Link to issue number: Fixes #12624 Summary of the issue: When opening a submenu in certain applications (like Thunderbird 78.12), NVDA can process a menu start event after the first item in the menu is focused. The menu start event causes a focus event on the menu, taking NVDA's focus from the menu item. Additionally, the "menu" parent of the submenu item is not keyboard focusable, and is separate from the menu item which triggered the submenu. The object tree in this case (menu item > submenu (not keyboard focusable) > submenu item). The focus event order after activating the menu item's sub menu is (submenu item, submenu). Description of how this pull request fixes the issue: Before cancelling speech, check that the focus is now on the parent menu. Testing strategy: Manual testing (note that this does not always occur and is hard to consistently reproduce): Enable debug logging With a Thunderbird 78.12 context menu (activate one on an email, for example) navigate to a menu item with a submenu. Activate it. Examine the logs for an event (submenu item, submenu) - eg the speech is announced in this order in the logs, as are the events if event debugging is enabled. On this PR: Confirm that this case has extensive logging when it occurs. When this event occurs confirm that the menu item is spoken, followed by the submenu. If you want to hear a beep on this event, change the logging to an error beep. On 2021.1: Confirm that only menu item is spoken, as the seubmenu item is cancelled. Known issues with pull request: This may be an overzealous check. Speech in similar contexts that should be cancelled may continue to be spoken. As such, debug logs are added to make handling new cases easier until the root problem of event processing is addressed.
Author
Parents
Loading