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

NVDA not offering Browse Mode for custom browser app #13493

Closed
yolpsoftware opened this issue Mar 16, 2022 · 16 comments
Closed

NVDA not offering Browse Mode for custom browser app #13493

yolpsoftware opened this issue Mar 16, 2022 · 16 comments
Labels
blocked/needs-external-fix triaged Has been triaged, issue is waiting for implementation.

Comments

@yolpsoftware
Copy link

Our software runs a Chromium browser control. Out of some reason, the browser seems to be not recognized by NVDA as a browser, because it is not possible to switch from Focus Mode to Browse Mode.

This is either a bug in NVDA, or a problem with our app. In the second case, we need to know how to adapt our application such that NVDA recognizes it as a browser, or simply as "browse mode ready".

Steps to reproduce:

  1. Create a .NET WinForms application which contains a CEF (Chromium Embedded Framework) browser control. One example would be the CefSharp.WinForms.Example in the CefSharp codebase (download the whole codebase, open the solution CefSharp3.sln in Visual Studio and select the "CefSharp.WinForms.Example" as the startup project).
  2. Run the project while NVDA is running.
  3. Press NVDA+Space (Insert+Space).

Actual behavior:

NVDA does not switch from Focus Mode to Browse Mode.

Expected behavior:

NVDA should switch from Focus Mode to Browse Mode, so that the text contents in the browser are read by NVDA.

System configuration

NVDA installed/portable/running from source:

installed

NVDA version:

2021.3.1

Windows version:

Windows 10 Home 21H2

Name and version of other software in use when reproducing the issue:

CefSharp 99.2.90.0

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

no

If NVDA add-ons are disabled, is your problem still occurring?

no add-ons installed

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

yes

@LeonarddeR
Copy link
Collaborator

Is anything holding you back from using Webview 2?

I tried to follow the steps to reproduce, but am getting an enormous bunch of errors and therefore can't build the project.

@yolpsoftware
Copy link
Author

Is anything holding you back from using Webview 2?

Not sure whether there is a hard requirement for CEF. But at least it would involve refactoring a large codebase.

I tried to follow the steps to reproduce, but am getting an enormous bunch of errors and therefore can't build the project.

I just created a stripped-down demo here. Please open this in Visual Studio, switch to Release mode and simply run it. (if there are errors, you might need to "Restore Nuget Packages" by right-clicking on the Solution in Solution Explorer).

Same issue in that demo.

@LeonarddeR
Copy link
Collaborator

The demo works for me.
Normally, NVDA uses the IAccessible2 API to get accessibility information from Chrome. With this embedded version of Chrome, NVDA seems to be unable to query the IAccessible2 interfaces and falls back to plain IAccessible/MSAA. I've seen this in embeded Chrome versions in Qt as well. Pretty sure it is a problem in the embedded version of Chrome.

@yolpsoftware
Copy link
Author

yolpsoftware commented Mar 18, 2022

I have just added a second project, which uses Webview 2 instead of CEF. Please pull and then run the second project in the solution.

Same issue there. NVDA does not switch to Browse Mode when Insert+Space is pressed.

Is there a Webview 2 scenario which has been tested to support Browse Mode?

@LeonarddeR
Copy link
Collaborator

When below
webView21.Source = new Uri("https://en.wikipedia.org/wiki");
I add:
webView21.Focus();
It works like a charm here.

@yolpsoftware
Copy link
Author

Right. Thanks.

@amaitland
Copy link

@seanbudd seanbudd added the triaged Has been triaged, issue is waiting for implementation. label Mar 21, 2022
@yolpsoftware
Copy link
Author

I tried --force-renderer-accessibility both in our app and in the cefclient.exe official build. No difference, Insert+Space still doesn't work.

@yolpsoftware
Copy link
Author

Please note that JAWS is able to use Browse Mode on cefclient.exe. Steps to reproduce:

  • Download the official build of CEF.
  • Start it with cefclient.exe --multi-threaded-message-loop --no-sandbox.
  • Run JAWS or NVDA.
  • You will see that JAWS offers to step through the website page by pressing the Down Arrow Key. NVDA however does not read the page contents.
  • Compare this to an actual browser (Chrome, Firefox, Edge, Safari) or to another web control like Microsoft WebView2, where NVDA reads the document when the user presses the Down Arrow.

@LeonarddeR
Copy link
Collaborator

Do I need to build cefclient myself? I can't find an executable in the tarball you mentioned.
Does JAWS browse mode work in your test app?

@yolpsoftware
Copy link
Author

My fault, I posted the wrong link, sorry! Here's the one with the client:

https://cef-builds.spotifycdn.com/cef_binary_99.2.13%2Bgd9af866%2Bchromium-99.0.4844.83_windows32_client.tar.bz2

Unzip it and switch to the Release folder, then run cefclient.exe --multi-threaded-message-loop --no-sandbox.

Yes, JAWS seems to offer browse mode, both in our actual app and in cefclient.exe.

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Mar 22, 2022

Interesting enough, as long as I leave out the --multi-threaded-message-loop parameter, browse mode works fine here. Why would this parameter be required?

@yolpsoftware
Copy link
Author

Right. Thanks Leonard. Gonna investigate.

@lukaszgo1
Copy link
Contributor

Assuming this issue occurs only when browser control is in a separate thread this is indeed an NVDA issue but should be closed as a duplicate of #8553

@LeonarddeR
Copy link
Collaborator

pretty sure this can indeed be classified as a duplicate of #8553. Closing this issue in favor of that one.

@LeonarddeR
Copy link
Collaborator

I wrote a proto type to address this. See #13542

@LeonarddeR LeonarddeR reopened this Mar 26, 2022
seanbudd pushed a commit that referenced this issue Mar 2, 2023
…ead (#13542)

Fixes #8553

Summary of the issue:
When an app offers IAccessible2 as its accessibility interface, NVDA needs to install a COM proxy in the UI thread to utilize IA2. However, some apps, particular those that embed Chromium Embedded Controls, have a separate UI thread for the browser control. IAccessible2 and therefore browse mode doesn't work in these controls.

Description of how this pull request fixes the issue:
Register IA COM Proxy in all threads that ever send focus or foreground win events

Testing strategy:
Tested with the Chromium Embedded Framework test case from #13493 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/needs-external-fix triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

5 participants