Accessible TextEditor adds extra accessible components on macos


So it seems the default accesibility setup for juce::TextEditor adds extra subordinate components to the accessible hierarchy for each text editor on macOS. (It may do so on windows also - I have not tested).

In my little toy juce testbed if I make an editor where the entire code is this:

    setSize (784, 742);
    setTitle( "Main Window" );
    setDescription( "Main Window" );

    auto tc = std::make_unique<juce::TextEditor>();
    tc->setText("Hey there", juce::NotificationType::dontSendNotification);
    tc->setTitle( "Hey" );

    testComponent = std::move(tc);

using Juce 6.1.3 then when I look at the resulting window in the AccesibilityInspector I see this

See those three extra groups with <empty description>? Those are all children of the text editor.

So I can fix this as follows. When I set up the accessibility for my component

    for (auto c : tc->getChildren())

(where tc is the text editor here).

Then I see the above.

So cool I can add that fragment to my text editors in surge. But

1: Should I? and
2: Should I only do it on mac? and
3: etc… any thoughts?

Thanks so much!

1 Like

Just a wee bump here. This is still happening in 6.1.6. My workaround still works too!