Narrator checking - false positive (accessibility)

Hi JUCE devs!

We have had more than one Windows user report that our app is detecting Narrator being on when it actually isn’t!

Here is the code in question that is behind the false positives:

(modules/juce_gui_basics/native/accessibility/juce_win32_Accessibility.cpp) …:

static bool areAnyAccessibilityClientsActive()
    const auto areClientsListening = []
        if (auto* uiaWrapper = WindowsUIAWrapper::getInstanceWithoutCreating())
            return uiaWrapper->clientsAreListening() != 0;

        return false;

    const auto isScreenReaderRunning = []
        BOOL isRunning = FALSE;
        SystemParametersInfo (SPI_GETSCREENREADER, 0, (PVOID) &isRunning, 0);

        return isRunning != 0;

    return areClientsListening() || isScreenReaderRunning();

Our most definitive insight comes from one of our customers, and is as follows: they went through the list of running Windows processes for potential culprits. Among them was a service as part of “Plantronics Hub” which is software for controlling how bluetooth headsets work with applications. Our user removed this (and several others).

Our user doesn’t know for sure if it was the Plantronics software, but after removing it the unwanted narration is no longer present!

Anyhow - hoping this feedback is of help.

Thank you very much for keeping on improving JUCE!

Best wishes, Pete