BR: VoiceOver reading out notifications for inaccessible windows

Hey JUCE team

I’ve been trying to add an intentionally inaccessible component to the desktop (a visual tooltip-style thing). I’ve called setAccessible(false) on the component which AFAIK should prevent addToDesktop from sending a windowOpened notification event.

However, after adding it to the desktop, occasionally VoiceOver will read out “[App Name] has new, window”, when it shouldn’t.

The issue can be repro’d in the WidgetsDemo, by turning off bmc’s accessibility to false (here-ish). Once launched in the DemoRunner with VO running, if you press either “star” button (the ones that spawn the bubble message), VO will read “DemoRunner, has new, window” after a short delay.

It looks like Ed fixed the exact issue I’m describing here in 2021 by only setting the accessibilityElement property to YES when the component has a handler, however the change was then reverted here, possibly to fix a different bug.

Applying the original “fix” locally fixes it for me, as does something like

[window setAccessibilityElement: component.isAccessible()];

and I’m not seeing any unwanted side effects, but I may be missing some of the potential repercussions.

Please let me know if you need any more info and if this is something that you can take a look at. The customer-facing side effect is that VoiceOver users could get distracted by an unwanted & potentially confusing notification whilst trying to do something that happens to spawn the component.

Thanks!