Hi all,
We have an app that was originally just a pure Windows app (Win32/MFC). We recently added some JUCE views to it, which live alongside the old MFC UI. So it’s a kind of hybrid app, not a JUCE standalone app (it wasn’t created with Projucer).
There’s an issue with accessibility. When the app window is activated/focused, screen readers say “JUCE Application” instead of the actual name of the app!
It seems that the “JUCE Application” string is hard coded in a function called getAccessibleApplicationOrPluginName() which is defined in juce_AccessibilityHandler.cpp:
inline String getAccessibleApplicationOrPluginName()
{
#if defined (JucePlugin_Name)
return JucePlugin_Name;
#else
if (auto* app = JUCEApplicationBase::getInstance())
return app->getApplicationName();
return "JUCE Application";
#endif
}
And this is returned to screen readers via AccessibilityNativeHandle::getElementName().
It was tempting to just #define JucePlugin_Name "My App", but it’s not that simple because the app consumes JUCE as a static library which is built independetly of the parent app, and is also used in other apps.
Obviously, I could change the JUCE code to get my app name in somehow, but I’d rather not
because it seems like something that JUCE should provide.
Could JUCE be changed to let hybrid, non-Projucer apps such as ours define an app name for accessibility purposes? Or maybe there’s an existing way that I’m missing?
@ed95 I hope you don’t mind me tagging you again, but you seem like the right person to nudge given that it’s accessibility related.
Many thanks,
Ben
