Skip to main content


To all #blind #ScreenReader users on various platforms who use #Firefox: The project to speed up web page and screen reader interaction, code-named Cache-The-World, is now at a phase where in Nightly 109, it has been enabled for all users. So if you spot anything that is unusual or not working as before, please let the #accessibility team know. Next step is an experiment for 50% roll-out on Windows in the 111 beta.

The page where you can track the progress is here: https://wiki.mozilla.org/Accessibility/CacheTheWorld
in reply to Marco Zehe

that page says that Narrator previously didn't work with Firefox. Did NVDA or other screen readers work? How could screen reader users use Firefox?
in reply to M. Verdone

@sixohsix Yes, NVDA and JAWS have worked with Firefox since version 1.5 back in 2006. This all took a bit of a hit in 2017 when Project Quantum was rolled out. Version 57 was quite bad, 58 to 61 fixed most of the bugs, but the performance was not as good as it had been pre quantum days. This new project aims to correct design decision mistakes that were made during the Project Quantum development phase, while keeping full compatibility and extending to Narrator.
in reply to Marco Zehe

I understand. Maybe I'll look into the code changes as I don't understand how something can work with NVDA but not with Narrator, since I thought they used the same Windows API.
in reply to M. Verdone

@sixohsix NVDA uses a multitude of Accessibility APIs available on Windows, ranging from the old MSAA plus the Linux Foundation add-on called IAccessible2, which is what LibreOffice, Firefox and chromium implement, to Java AccessBridge to Microsoft's MSAA replacement called UI Automation. Chromium implements that too since Microsoft got on board, but it is still not as good as the IAccessible2 stuff. Narrator supports UIA only.
in reply to Marco Zehe

@sixohsix Narrator can only work with MSAA and IAccessible2 supported applications through an IA2-to-UIA bridge that Microsoft implemented. The performance isn't really that good, since it all has to do cross-process calls, but with Firefox with its previous implementation, because of double-cross-process-calls, the performance was unbearable. So yeah, Narrator might have worked, but usability due to lack of performance just wasn't there. This all will be better now with everything cached.
in reply to Marco Zehe

@sixohsix A minor correction: As far as I know, the IA2 to UIA bridge runs in-process. Even though UIA clients run out-of-process, they can do batch queries and tree walks and the IA2 queries then get dispatched in-process. So, performance with Narrator will be significantly better with the cache, though still not as fast/reliable/correct as it would be if Firefox had a native UIA implementation.
in reply to Jamie Teh

@sixohsix A native UIA implementation is out of scope for this project, but this project is a foundational prerequisite for any work related to UIA. We hope to start looking into native UIA in 2024, maybe earlier if possible, but absolutely no promises at this stage.
in reply to Jamie Teh

@jcsteh Yeah I understand that UIA is out of scope for this project. Do you know by chance how good Chromium's UIA implementation is by now? Is it anywhere near production-ready yet, or is it still better to rely on IA2 for JAWS and NVDA at this stage?
@sixohsix
in reply to Marco Zehe

I think IA2 is still better for JAWS and NVDA, especially JAWS, since some features there depend specifically on buffers. I believe it's come a long way, though. I honestly don't know for sure where it's at; I haven't looked at it in a while. There are annoying deficiencies in the way UIA maps the web, though; e.g. overloading LocalizedControlType, stuffing ARIA properties into ARIAProperties instead of proper native mapping, etc.
in reply to Jamie Teh

@jcsteh Yeah, especially the ARIA mappings offloads a lot of responsibility to the screen readers to interpret that browsers traditionally are much better at, IMO. And what is the ARIA to native mapping table for then anyway, if uIA still requires the screen reader or other assistive technology to interpret the attributes themselves? This creates unnecessary friction.
in reply to Marco Zehe

@jcsteh Now that Firefox is caching the world, I wonder if it's actually worthwhile for Firefox to have a native UIA implementation. Microsoft's attempts to remake Windows into a more locked-down platform didn't actually succeed, and now they seem to have retreated from that. Why not just stick with the accessibility API that co-evolved with the screen readers and modern browsers that people actually use, and let Narrator keep using Microsoft's bridge?
in reply to Matt Campbell

@matt For the most part, i agree with you. However, there are some problems with the bridge that cause real performance issues. For example, even when it's just walking the tree, UIA wants to know whether something is a control element or not, and that alone keeps querying IAccessible2 attributes on every element trying to work out whether it is a live region (I can see that from the stack functions). It also uses regexp matching to do that, which is super slow in our profiling.
in reply to Jamie Teh

@jcsteh Ouch, just shows you how much I've forgotten since I left.
in reply to Jamie Teh

@matt That said, you just made me wonder whether we can work around some of this by using IAccessibleEx/IRawElementProviderSimple to just implement only the properties that cause problems with IA2. I know the MSAA bridge supports that, but I'm not sure about the IA2 bridge.
in reply to Jamie Teh

@jcsteh There's one bridge, that conditionally uses IA2 if it's implemented.
in reply to Matt Campbell

@matt I might play with that. Thanks for catalysing the idea. Haha.
in reply to Jamie Teh

@jcsteh That said, I don't remember if we ever designed for the possibility that a provider would implement both IA2 and IAccessibleEx. It's been too long since I looked at that code; I can't say how it would behave.
in reply to Matt Campbell

@jcsteh Working on AccessKit, I see the following technical benefits to implementing UIA in a non-browser context:

1. NVDA can take advantage of UIA's bulk fetch. For MSAA/IA2 in a non-browser context, it has to do chatty IPC.
2. A UIA provider can signal that it's safe to call that provider's methods away from the UI thread.
3. An IA2 unique ID is only 32 bits, but a UIA runtime ID is variable-length. So I don't need a mapping from AccessKit to IA2 IDs.
in reply to Matt Campbell

@jcsteh Considering the deficiencies of UIA that you and Marco pointed out, if IA2 were extended to resolve my first two points, I'd consider switching.
in reply to Matt Campbell

@matt While I think I would have answered differently a few years ago, as I noted in a previous thread with you, I think UIA is probably the right choice now for anything other than a browser. It has flaws, yes, but so does IA2. Browsers are just complicated enough (and have so many obscure use cases) that UIA just isn't ready for them yet.
in reply to Jamie Teh

@jcsteh The over-reliance on LocalizedControlType, which as you point out is problematic for Braille users, seems like reason alone to consider rejecting UIA. The performance benefits of UIA in a non-browser context are the main thing holding me back now. Well, and the fact that I have higher-priority things to do for a while.