Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Accessibility Change Notifications #5631

Merged
merged 1 commit into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/surge-xt/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,10 @@ void SurgeGUIEditor::openOrRecreateEditor()
patchSelector->grabKeyboardFocus();
}

if (auto *handler = frame->getAccessibilityHandler())
{
handler->notifyAccessibilityEvent(juce::AccessibilityEvent::structureChanged);
}
frame->repaint();
}

Expand Down Expand Up @@ -6279,6 +6283,16 @@ void SurgeGUIEditor::addComponentWithTracking(juce::Component *target, juce::Com
auto cf = containedComponents.find(&source);
if (cf != containedComponents.end())
containedComponents.erase(cf);

/* Place this accessibility invalidation here in either case */
if (auto *handler = source.getAccessibilityHandler())
{
if (handler->getValueInterface())
{
handler->notifyAccessibilityEvent(juce::AccessibilityEvent::valueChanged);
}
handler->notifyAccessibilityEvent(juce::AccessibilityEvent::titleChanged);
}
}
void SurgeGUIEditor::addAndMakeVisibleWithTracking(juce::Component *target, juce::Component &source)
{
Expand Down
5 changes: 5 additions & 0 deletions src/surge-xt/gui/widgets/WidgetBaseMixin.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ struct WidgetBaseMixin : public Surge::GUI::SkinConsumingComponent,
{
for (auto t : listeners)
t->valueChanged(this);

if (auto *handler = asT()->getAccessibilityHandler(); handler->getValueInterface())
{
handler->notifyAccessibilityEvent(juce::AccessibilityEvent::valueChanged);
}
}
void notifyControlModifierClicked(const juce::ModifierKeys &k, bool addRMB = false)
{
Expand Down