Skip to content

Commit

Permalink
Invalidate 'arm' title when arming modsources
Browse files Browse the repository at this point in the history
For accurate screen reader support, send a title changed event

Addresses surge-synthesizer#6512
  • Loading branch information
baconpaul committed Aug 20, 2022
1 parent 3d6bb14 commit 7460b57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/surge-xt/gui/widgets/ModulationSourceButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,16 @@ struct ModulationSourceButton : public juce::Component,
if ((state & 3) == 2)
{
toggleArmAccButton->setTitle("Disarm");
toggleArmAccButton->setDescription("Disarm");
}
else
{
toggleArmAccButton->setTitle("Arm");
toggleArmAccButton->setDescription("Arm");
}
if (auto *h = toggleArmAccButton->getAccessibilityHandler())
{
h->notifyAccessibilityEvent(juce::AccessibilityEvent::titleChanged);
}
}
int getState() const { return state; }
Expand Down

0 comments on commit 7460b57

Please sign in to comment.