I talked to a Windows user today on #tor who uses a screen reader and was reporting that Tor Browser 8 doesn't work for them. They reported that the Firefox ESR does work for them.
I guess it's because Firefox ESR is built with clang, and we want to build with mingw, for reproducible build purposes?
In any case, count another user affected by this bug.
It was not suggested before, just mentioning that this should not be activated per default (legacy/trac#26505 (moved)), even if it worked (and users should be informed more about the consequences):
Firefox Accessibility Service is a technology built into Firefox that provides 3rd party applications running on the same device the ability to inspect, monitor, visualize, and alter web page content hosted within Firefox.
https://support.mozilla.org/en-US/kb/accessibility-services
I talked to a Windows user today on #tor who uses a screen reader and was reporting that Tor Browser 8 doesn't work for them. They reported that the Firefox ESR does work for them.
I guess it's because Firefox ESR is built with clang, and we want to build with mingw, for reproducible build purposes?
Yes and no. The reason for the bug is that mingw-w64 does not support the new accessibility related code in Firefox (widl is the problem here, to be more exact) regardless if you are using clang with it (which we will be doing soonish) or GCC (which we are doing now) as the compiler. mingw-w64 "just" provides the Windows headers etc.
We had another person on #tor today asking about this.
I wonder if we can use our twitter power to draw attention to the widl bug?
We could do that. My idea was to ask around at a less noisy scale first to find someone who could help us with fixing this bug. But I guess we could to both in parallel.
Note to self: when bumping the mingw-w64 version we can get rid of our CXXFLAGS in our mozconfig files as the widl changes we need come after commit a91a7e405752bbdbe39101f7aaeb1e1d932199db.
Could anyone being affected by this bug test the custom bundle below? It should have the fixes Jacek wrote for https://bugzilla.mozilla.org/show_bug.cgi?id=1430149 and is not exploding on my Windows 7 testing machine:
Note: you might have trouble connecting to the Tor network when starting up Tor Browser the first time. In that case, closing Tor Browser and starting it again should fix that (I am currently looking into providing a bug report for that behavior for the network folks).
Thank you for working on this! Tor button and browser controls are now accessible again. However, it appears that web content is not being exposed to the screen reader, so where the website should be rendered, there's just something called "unknown". I'm not sure what the cause of that is, but it is across all sites. I tested with about:tor, youtube and wikipedia. I tested with Windows 7 using NVDA as a screen reader. To summarise, screen reader users cannot interact with websites, but everything that is not web content works.
Thank you for working on this! Tor button and browser controls are now accessible again. However, it appears that web content is not being exposed to the screen reader, so where the website should be rendered, there's just something called "unknown". I'm not sure what the cause of that is, but it is across all sites. I tested with about:tor, youtube and wikipedia. I tested with Windows 7 using NVDA as a screen reader. To summarise, screen reader users cannot interact with websites, but everything that is not web content works.
Thanks for the feedback. I guess the big question is "Is that caused by a missing accessibility patch OR by some other patches we ship"? I guess I compile a vanilla Firefox with the accessibility patches and we'll find out...
Trac: Owner: tbb-team to gk Keywords: N/Adeleted, TorBrowserTeam201811, GeorgKoppen201811 added Status: needs_information to assigned
On my Windows machine double-clicking on the .zip file in the explorer makes a Browser directory available. Then I dragged that one on the desktop and double-clicked on it. Double-clicking then on the firefox.exe should start Firefox. It's an ESR 60 Firefox just with Jacek's accessibility patches (without any we use for Tor Browser).
Does that one work for anyone with accessibility support (i.e. both chrome and content are rendering properly)?
Hi
Web content is still not rendering properly for me with the clean Firefox, it behaves like the Tor Browser build. I run NVDA for screen reader on Windows 7.
Hi
Web content is still not rendering properly for me with the clean Firefox, it behaves like the Tor Browser build. I run NVDA for screen reader on Windows 7.
Great, then let's dig deeper. One guess I have is that the problem is multi-process (e10s)/sandboxing related. Could you disable e10s by flipping browser.tabs.remote.autostart to false in your about:config and restart both Tor Browser and the Firefox I gave you? Does that change things?
(And no worries about not being well-versed in terminology. :) Just ask if I speak too jargon-y)
Hi! :)
Yes!! Flipping browser.tabs.remote.autostart to false solved it, both on the Tor Browser and clean Firefox. Now everything is accessible. Awesome!
Ah excellent, will do! :)
Hi! :)
Yes!! Flipping browser.tabs.remote.autostart to false solved it, both on the Tor Browser and clean Firefox. Now everything is accessible. Awesome!
Ah excellent, will do! :)
Great! So, we are on the right track then. Let's try a bit more to narrow the problem down. Can you flip back browser.tabs.remote.autostart to true and restart the browser? Then look after security.sandbox.content.level in your about:config. Can you set that to 0 and the value you are seeing right now and restart the browser between every change (trying to figure out if the sandbox is breaking accessibility and, if so, at which level this is happening)? Does that already help? If so, what is the first sandbox level that causes the trouble for you?
Hi! :)
Yes!! Flipping browser.tabs.remote.autostart to false solved it, both on the Tor Browser and clean Firefox. Now everything is accessible. Awesome!
Ah excellent, will do! :)
Great! So, we are on the right track then. Let's try a bit more to narrow the problem down. Can you flip back browser.tabs.remote.autostart to true and restart the browser? Then look after security.sandbox.content.level in your about:config. Can you set that to 0 and the value you are seeing right now and restart the browser between every change (trying to figure out if the sandbox is breaking accessibility and, if so, at which level this is happening)? Does that already help? If so, what is the first sandbox level that causes the trouble for you?
I tried all levels between 0 and 5 (the default), and accessibility seems to break at level 0, and doesn't work on any other levels.
Well I am not onionsoup, but I did not see a reply to this comment and I am affected by this issue. I can confirm that the official version of Firefox 64.0.2 works just fine for me with both NVDA and the latest version of JAWS. All of the recent versions of FF since version 60 have not presented any accessibility issues for me.
Well I am not onionsoup, but I did not see a reply to this comment and I am affected by this issue. I can confirm that the official version of Firefox 64.0.2 works just fine for me with both NVDA and the latest version of JAWS. All of the recent versions of FF since version 60 have not presented any accessibility issues for me.
My apologies for the late reply, I've been without internet. Indeed, the official Firefox builds are accessible to me, using the latest NVDA on Windows.
Jacek's patches landed in Firefox 66 (Firefox Nightly now) which should be tested instead of Firefox 64.0.2.
Nope 64.0.2 was good as the point was to check whether the accessibility support Mozilla provides right now is working while the Tor Browser one is not (and the former is not related to Jacek's patches).
So, I think we should move a step forward and test what we get with the switch to ESR 60.5.0. At least this allows the workaround in comment:19 and allows us to shake out more bugs. Additionally, it allows us to start from a better position to debug the problem.
Previously, I needed an additional mingw-w64 patch to unbreak the build but that's not needed anymore. It's not clear yet why that happens. I verified the patches I used back then are the same that are on esr60 and the diff between the mingw-w64 versions used then (172cf5520c61a607cc5acb59e2709bf303e5ec47) and now (2d4e517ad0c7a9f0bd7001c42e6c131b977c15d9) does not show anything obvious. I am not complaining... :)
Trac: Keywords: TorBrowserTeam201901 deleted, TorBrowserTeam201901R added Status: needs_information to needs_review
Yeah, I had the same idea but it's not that. So, I guess either a) Mozilla added some additional commit to esr60 that resolves this issue which I had not or b) the mingw-w64 diff explains this or c) I messed up the patch for this bug.
Could someone affected by this bug run it and attach the log output here reproducing the issue in comment:13? I hope we see some assertions in it that might give us a hint at what is going on and where to look closer.
Note: you might need to start Tor Browser several times until it finally starts up: once due to a crash on first start and the second time due to a bug in network status parsing on Windows which stalls the Tor startup.
I am affected by this too. I have run the test version. After several times it seemed like the connection was established, because the Firefox interface (accessible) showed up.
I was however unable to load any webpage, I tried several but nothing noticeable has actually happened.
I have copied output from Start tor browser window, i guess it is the log you are referring to.
I am affected by this too. I have run the test version. After several times it seemed like the connection was established, because the Firefox interface (accessible) showed up.
I was however unable to load any webpage, I tried several but nothing noticeable has actually happened.
I have copied output from Start tor browser window, i guess it is the log you are referring to.
Thank you for solving this!
Hi Rastislav Kiss,
I attached my debug as well as you can probably see. I'm not sure if it was very helpful though, because if I went to any web page for example google, the tab would keep crashing on me. This was not before I was able to reproduce the "unknown" message from NVDA however. Hopefully one of our logs will help.
I consistently get a "your tab just crashed" message when running this build, so I can't actually load any webpages. The "your tab just crashed" page is accessible however.
Replying to gk:
Okay, let's try finding out something with a debug build. I created one based on ESR 60.5.0 with accessibility support:
Could someone affected by this bug run it and attach the log output here reproducing the issue in comment:13? I hope we see some assertions in it that might give us a hint at what is going on and where to look closer.
Note: you might need to start Tor Browser several times until it finally starts up: once due to a crash on first start and the second time due to a bug in network status parsing on Windows which stalls the Tor startup.
Hi,
my name is Christopher and I am blind. I want to use the torbrowser, I had used it on 2016 but now I had this accessibility problems.
The Tor windows and all dialogs of the firefox browser are readable and for me no problem.
But the website is not accessible, with the newest torbrowser alpha on a windows 10 computer with NVDA 2018.4.1.
Do you work on the accessibility problems, can I help you with testing?
I hope you could fix the accessibility problems.
Hi,
my name is Christopher and I am blind. I want to use the torbrowser, I had used it on 2016 but now I had this accessibility problems.
The Tor windows and all dialogs of the firefox browser are readable and for me no problem.
But the website-area is not accessible, with the newest torbrowser alpha on a windows 10 computer with NVDA 2018.4.1.
This means that if I tab to the area, where the website is shown and normaly the website is read out from NVDA, the Screenreader says now "unknown", what means that this is not readable or accessible for the screenreader.
Do you work on the accessibility problems, can I help you with testing?
I hope you could fix the accessibility problems.
So after applying patches in ( https://bug1520177.bmoattachments.org/attachment.cgi?id=9039768 ) I've a working (albeit hacked together) build working with NVDA on Windows 10. The strange thing is that Mozilla folks are reporting a crash in their build with the same patches applied, so I'm a bit confused. It's possible there is a bug in the version of mingw or clang they are using that I haven't hit, will investigate further.
EDIT: also possible the issue only occurs on 64-bit with patches applied
So after applying patches in ( https://bug1520177.bmoattachments.org/attachment.cgi?id=9039768 ) I've a working (albeit hacked together) build working with NVDA on Windows 10. The strange thing is that Mozilla folks are reporting a crash in their build with the same patches applied, so I'm a bit confused. It's possible there is a bug in the version of mingw or clang they are using that I haven't hit, will investigate further.
I've hit the problem with our setup as well, see e.g. my comment:36.
EDIT: also possible the issue only occurs on 64-bit with patches applied
That's interesting. Care to share a 32bit bundle so others affected in this bug can test/verify that assumption?
I just ran the 32 bit test bundle. When I load pages now, NVDA doesn't seem to treat them as a web page, though it is able to tab around to links, form controls and such. I am, however, unable to switch to browse mode to interact with the document like a webpage (I tried pressing NVDA+space, nothing happened). To see what NVDA should be doing, try going into Firefox or Chrome, and navigate by element, such as to next heading (press h) or read the webpage with arrow keys. I suspect that the fix is simple, as NVDA definitely sees the rendered content, it just doesn't seem to treat it as a web document.
Hopefully I make sense - I'm not very well-versed in terminology.
I just ran the 32 bit test bundle. When I load pages now, NVDA doesn't seem to treat them as a web page, though it is able to tab around to links, form controls and such. I am, however, unable to switch to browse mode to interact with the document like a webpage (I tried pressing NVDA+space, nothing happened). To see what NVDA should be doing, try going into Firefox or Chrome, and navigate by element, such as to next heading (press h) or read the webpage with arrow keys. I suspect that the fix is simple, as NVDA definitely sees the rendered content, it just doesn't seem to treat it as a web document.
Hopefully I make sense - I'm not very well-versed in terminology.
Sorry, didn't know NVDA could do that. So what I see (on 32-bit Windows 10 with 32-bit Tor Browser) is that NVDA now reads out web content when it's moused-over (where as before it did not).
I've built and tested 64 bit as well and see the same behavior as described above in 64-bit Windows 10 with (ie able to read page contents via mouse-over using NVDA)
Here's the current changeset used to build the above nightlies (literally just the current patch from the Mozilla bug)
I've built and tested 64 bit as well and see the same behavior as described above in 64-bit Windows 10 with (ie able to read page contents via mouse-over using NVDA)
Here's the current changeset used to build the above nightlies (literally just the current patch from the Mozilla bug)
All those builds are debug builds, however, while yours are none it seems. Thus, one thing we could test is whether you see the same problem compiling with --enable-debug.
But then, why are non-debug builds working better now? Not sure, yet. I guess one of the fixes in your patch on bug_27503_v2 could have helped with non-debug builds as well. Might be worth figuring out which one of those changes does that (assuming you run into the same problem as described pre comment:36 without any of the patches in https://bugzilla.mozilla.org/show_bug.cgi?id=1520177 applied).
I've built and tested 64 bit as well and see the same behavior as described above in 64-bit Windows 10 with (ie able to read page contents via mouse-over using NVDA)
Here's the current changeset used to build the above nightlies (literally just the current patch from the Mozilla bug)
All those builds are debug builds, however, while yours are none it seems. Thus, one thing we could test is whether you see the same problem compiling with --enable-debug.
Yes, that's been it: we are hitting the assert on the debug builds which result in a broken experience. The non-debug builds (i.e. those we ship) are less affected: there is accessibility support even though it's not fully on par with that offered by vanilla Firefox). I'll take the patch from pospeselr's bug_27503_v2 for the upcoming alpha to give it wider testing. That's commit f5f845f5 on tor-browser-60.6.1esr-8.5-1 and will hopefully be available in 8.5a11.
Leaving this ticket open to investigate and fix the remaining issues.
Ok this thread's been a bit dead for awhile but lots of things have been happening in other parts of the internet. The root cause for this issue is that the widl build tool (wine's reimplmentation of midl.exe used to generate the code and binary blobs needed for RPC and COM Proxies to work) was generating bad bits in many interesting ways.
The squashed branch has all needed fixes and I've verified with a hacked together windows build that the screen reader works as expected, doesn't crash Tor Browser, the ia2 interfaces are proxied correctly and pages are navigable via arrow keys (so if I get hit by a bus that's where you'll need to start).
The work that remains:
patches for (wine) 47035, 47041, 47049, and 47050 need to be merged into wine (47035 is hard in particular as it requires a non-trivial refactor and the wine devs justifiably don't want to look at the giant diff)
the updated widl needs to ride the trains into mingw
and while we wait for that to happen, the updated widl need to be rebased against the mingw version and the resulting patch added to tor-browser-build's mingw project
I'm OOF in the wilderness starting tomorrow through Monday but I should be able to do a good chunk of this on Saturday, and I would guess we'd see a tor-browser-build patch ready for prime-time by middle of next week (the mingw 'branch' of widl is a bit weird and may cause some headaches).
Oh hey check it out a patch to review! This branch includes a temporary patch to mingw-w64 that brings over a squashed version of this patchset ( https://github.com/pospeselr/wine/tree/widldev ) along with a few mingw specific changes to the widl.c, configure, and VERSION files.
NOTE: The final commit of the 'widldev' wine branch is a bit different from the final commit of the 'squashed' branch, as I discovered and fixed a few subtle problems through the processes of splitting up commits (as well as some const-correctness issues).
Ok for better reviewability, here is the widl changes that fix the various bugs, as well as a change to widl.c that mingw applies when building to handle mingw's default include directories.
Once my current build finishes, I'll amend the tor-browser-build branch for mingw to remove the changes to VERSION and configure as they only update the version string to 4.9 from 3.20 but doesn't functionally alter any of the compiler output (apart from version strings)
To generate the mingw-w64 patch in the bug_27503 tor-browser-build branch for yourself, you will need to first build wine (to generate the parser source from the yacc grammar file), then copy all of the *.c, *.h, *.l, and *.y files from the wine/tools/widl directory to mingw-w64/mingw-w64-tools/widl/src directory and do a git diff. This should generate the same 27503.patch file in tor-browser-build/projects/mingw-w64
NOTE: To build widl, from the wine root do a ./configure --without-x --without-freetype and the usual make
Where possible names were kept the same to minimize the size of the patch set. The 'elem' name here is a type_t and used on multiple lines whereas the 'element' (which is the name of the 'type' in an array) is a decl_spec_t and used in this one place. decl_spec_t has an instance of a type_t.
Essentially, this was the culprit behind types being multiply defined in the generated typelib. The only remaining duplication is for a specific pointer type. This remaining dup is fine because the reason we wish to avoid duplicates is so that user defined structs, unions, and enums can be compared directly by pointer to determine if the 'thing' is the same type. Such a comparison is not needed for pointer types.
Verified these both now working as expected on both 32 bit and 64 bit windows: NVDA screen reading and navigation working, and pounding a representative sample of the IA2 APIs no longer causes a crash. If any screen reader users could try these out that'd be great.
Hi,
I have tried again the 64-bit version, but it keeps crashing. The connection screen is okay, then NVDA announces the title of webpage: "About tor browser", and the window disappears immediately.
There is no obvious error message, I'm using Windows 10 1809 64-bit pro.
Hi,
I have tried again the 64-bit version, but it keeps crashing. The connection screen is okay, then NVDA announces the title of webpage: "About tor browser", and the window disappears immediately.
There is no obvious error message, I'm using Windows 10 1809 64-bit pro.
Ok interesting, does it crash for you if you open tor browser first and then run NVDA?
Hmm, this seems very interesting. I have tried few screenreaders, turning them on after Tor browser's start, and there seem to be different reaction for everyone.
Jaws, 64-bit screenreader, murders Torbrowser regardless of the current position in system immediately after startup.
NVDA, 32-bit one, Torbrowser keeps running while I'm not in its window. After focusing it, even this can be survived if i left it before NVDA starts to load the page, what is announced by voice, then Torbrowser crashes.
Microsoft Narrator, Windows built-in screenreader, totally surprisingly, this works! The page loads, can be read and there are no crashes. Although navigation by arrow keys doesn't work, it doesn't in Chrome as well, so this is rather Narrator's bug than Tor browser's problem I guess.
Just to be sure, when I talked about leaving Tor browser window before loading page with NVDA, I meaned loading by screenreader to its internal buffer, not loading by the browser when it wants to open the page.
Ok, sorry to be a pedant but can you clarify which version of which software you're running with each result? IE for each scenario I need to know:
version of Windows and whether 32 or 64 bit
32 or 64 bit Tor Browser
version of Screen Reader
result vs expected
On my end there are 3 base scenarios (multiplied by the number of screen readers):
32 bit windows w/ 32 bit Tor Browser
64 bit windows w/ 32 bit Tor Browser
64 bit windows w/ 64 bit Tor Browser
I'm currently looking into NVDA crashing 64-bit Tor Browser on 64-bit Windows 10 when transitioning from the tor network connection window to the main browser window. From what I can tell both 32 bit Tor Browser scenarios are working (with NVDA at least).
Wow, I just tried the 32-bit version of Tor browser, and it works, with all screenreaders! Completely accessible. Amazing!
But in order, here are my versions:
Windows 10 1809 pro 64-bit
Jaws 2019.1906.10 pro 64-bit
NVDA 2019.1.1 32-bit
Tor browser your test build 64-bit:
NVDA: TB crashes when NVDA want to load the page from browser to its internal buffers
Jaws: TB crashes, when a page is loaded.
Windows Narrator: Works.
Tor browser, your test build, 32-bit:
NVDA: Works.
Jaws: Works.
Window Narrator: Works.
So, as you said, problem is just with the 64-bit build of tor browser. 32-bit works, fantastic job.
Ok so the crash we're seeing on 64-bit windows is an exception raised by combase.dllObjectStublessClient. Essentially that method bails out if it's found the stub was built with midl.exe older than version 5.2.202, so the fix is to just update the version constant inserted by widl. I've tested on 64-bit windows with NVDA and Tor Browser now transitions from the network dialog to the main browser window without crashing.
What's the reason to not update the version to the latest one? As MinGW-W64 declares support for WinRT, it should be 8.1.622 or later: https://docs.microsoft.com/en-us/uwp/midl-3/
Hi,
i have tried the 64-bit version and it works! With all threee screenreaders. Brilliant!
I would like to thank you very very much and also all others, who worked on this issue so intensively. It's very nice to see developers who care about the accessibility.
What's the reason to not update the version to the latest one? As MinGW-W64 declares support for WinRT, it should be 8.1.622 or later: https://docs.microsoft.com/en-us/uwp/midl-3/
Hi,
i have tried the 64-bit version and it works! With all threee screenreaders. Brilliant!
I would like to thank you very very much and also all others, who worked on this issue so intensively. It's very nice to see developers who care about the accessibility.
Best regards and many thanks
Rastislav
I'm glad to hear that Rasislav, I really am. However, take care when using this test build. There were a few critical security fixes recently pushed out to Tor Browser and I do not know if these test builds have them. I would recommend holding off on using them until I can verify they are fully up to date.
EDIT: Ok it looks like the posted 64-bit build might have one of the fixes and definitely does not have the other. I will make some new builds with these security fixes ASAP.
What's the reason to not update the version to the latest one? As MinGW-W64 declares support for WinRT, it should be 8.1.622 or later: https://docs.microsoft.com/en-us/uwp/midl-3/
To any future code archaeologists or devs having to deal with similar COM or IA2 problems when using the mingw toolchain, here's a couple tools for you:
This is basically a fake screen-reader. It grabs the IAccessible object at a given point in screen-space, and recursively iterates over all the children calling IA2 APIs. Not all the APIs are covered (as I stopped implementing calls when screen readers stopped crashing Tor Browser) but is easy enough to add more.
A standalone mingw-based project for construction a COM client, proxy and server. I used this briefly as a minimal COM test-bed for reproducing marshaling related crashes. Should note that the project as is will compile but will fail at runtime with the current stock version of mingw.