NVDA's hotkeys doesn't work after activating window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

NVDA's hotkeys doesn't work after activating window

Postby JozefK » Mon Dec 07, 2020 4:26 am

There is a problem with NVDA's (screenreader) hotkeys standard behavior after activating window. Hotkeys are ignored, I suspect some there is a problem with not-active widget.

Reproduction steps with distributed CEF client application.

1) Install NVDA, execute NVDA, show NVDA Speech Viewer (NVDA Tray icon -> Tools -> Speech viewer)
2) Execute cefclient.exe
3) you can use NVDA's hotkeys ('q' - show next block)
4) deactivate cefclient(Alt+Tab to different application) and re-activate cefclient.exe (Alt+Tab) back.
5) type hot key 'q' -> hotkey is ignored (probably no widget has focus)
6) press Tab (widget will gain focus) and hotkey 'q' will work again


Expected behavior:
After activating cefclient.exe by pressing Alt+Tab, the NVDA's hotkey should work as in chrome.

This behavior works fine for chrome and Spotify (cef based app).
I think for Spotify - this behavior works fine because their CefBrowser is TopLevel window.

I found implementation of handling WM_ACTIVATE here:
Code: Select all
src-chromium\ui\views\win\hwnd_message_handler.cc


Code: Select all
HWNDMessageHandler::OnWndProc(
  ...
  if (message == WM_ACTIVATE && IsTopLevelWindow(window)) {
    PostProcessActivateMessage(LOWORD(w_param), !!HIWORD(w_param),
                               reinterpret_cast<HWND>(l_param));
  }
  ...


PostProcessActivateMessage - is responsible to activating correct widget for accessibility by calling
Code: Select all
    NotifyAccessibilityEvent(ax::mojom::Event::kWindowActivated);


We have a CefBrowser embeded in our native win Window same as in cefclient app.
Any idea.
Could we extend CEF API / modify CEF implementation to allow for Cef based application implement this behavior correctly?
Thank you very much.
JK.
JozefK
Techie
 
Posts: 20
Joined: Mon Feb 27, 2017 3:24 pm

Re: NVDA's hotkeys doesn't work after activating window

Postby magreenblatt » Mon Dec 07, 2020 10:19 am

Please add a bug.

Code: Select all
 Could we extend CEF API / modify CEF implementation to allow for Cef based application implement this behavior correctly?

It seems possible. PRs are welcome.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: NVDA's hotkeys doesn't work after activating window

Postby JozefK » Tue Dec 15, 2020 2:00 am

JozefK
Techie
 
Posts: 20
Joined: Mon Feb 27, 2017 3:24 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 83 guests