Work around pop over menu stealing focus in Ms Teams#11822
Conversation
|
@LeonarddeR |
c8da3c2 to
4a0cff6
Compare
See test results for failed build of commit 6132c6c287 |
|
Here is a try build. |
|
I believe the system test failure is unrelated to this work. |
|
Thanks @LeonarddeR
|
michaelDCurran
left a comment
There was a problem hiding this comment.
This looks okay. I agree this is a work-around, but for Teams, not NVDA. It looks like each time a message gets focus, focus is then bownced by Teams to the menu which is not appropriate. Further to this, the items in the menu don't have any labels until pressing enter, when the menu becomes usable.
NVDA focuses the menu because of SYSTEM_MENUPOPUPSTART. Are you saying that this might be cause by teams focusing the menu explicitly and does chromium translate this to SYSTEM_MENUPOPUPSTART?
That's certainly a bug indeed. |
|
Looking at the Chromium source code, it looks like that if an accessible
is shown, and its role is menu, then a menuPopupStart is fired.
So, I was wrong assuming that it was because it directly took focus, but
clearly when a message is focused, the menu is shown (though seems to
contain no text so no doubt is invisible).
I still think this is a bug in Teams for showing the menu on every
message focus. But, I also agree we could probably improve our logic
around menuPopupStart etc. Though we need to be careful making any
changes here as this code was added a long way back, mostly to do with
menu bars and context menus obviously.
|
I don't think this is true. At least, I've heard reports from sighted people that the menu is visible. |
|
Hmm. If I focus a message and get bounced to the menu, with object
navigation if I look at its child items, they are all menu items with no
name. Yet when I then presse enter, the items suddenly have names.
Perhaps @feerrenrut can comment on exactly what is shown when a message
is focused?
|
|
When focusing a message, visually there is a popup containing multiple emoji, and an overflow menu indicator (three dots). None of these are keyboard focusable until the enter key is pressed. It's pretty hard to guess how this is implemented, there are a lot of different ways it could be done. |
…on messages are focused. (#14363) Fixes #14355 Broadens approach from pr #11822 which was to fix #11821. Summary of the issue: When a conversation message is focused in Microsoft Teams (E.g. arrowing up and down a threaded conversation list) Teams displays a reaction menu along side the focused message. As Chromium therefore fires a menu popupStart event, NVDA handles this by faking focus on the menu itself This behaviour has been historically necessary for win32 context menus that fail to focus the first item in the menu. However, In Teams this is very disruptive. Description of user facing changes NVDA will no longer get stuck in a menu when arrowing up and down threaded conversations in Microsoft Teams. Description of development approach Broaden the approach taken in pr #11821 by suppressing handling of menu popupStart for any element in teams with 'menu' in its xml-roles attribute. Previously NVDA would also check for very particular message container classes on the parent's parent. But as Teams keeps moving these, this is no longer managable.
Link to issue number:
closes #11821
Summary of the issue:
In the most recent version of Microsoft Teams, a pop over menu is displayed for every focused message, stealing focus from the message and making it difficult for users to read the message.
Description of how this pull request fixes the issue:
Testing performed:
Tested that the issue does no longer occur. Also tested that pressing enter on a message in Teams correctly focuses the first item in the menu.
Known issues with pull request:
Given JAWS and Narrator don't suffer from this issue, I think this should be considered a workaround and therefore we should consider looking into how menu start and menu popup start events are handling, trying to filter out the false positives earlier on.
Change log entry: