1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 08:30:06 +02:00

Fix accessibility of Help button in dialogs

The name of the button was not being read as "help" by NVDA due to its built in appmodule for audacity. This meant that the empty label was being read rather than the accessibility name.

Fix: Call SetLabel. In addition, with the label being set, an accessible does not need to be set, because we can just let windows set the accessibility name from the label.
This commit is contained in:
David Bailes 2018-04-12 08:56:14 +01:00
parent 09063d6b41
commit 8e71ebca87

View File

@ -2290,10 +2290,7 @@ std::unique_ptr<wxSizer> CreateStdButtonSizer(wxWindow *parent, long buttons, wx
// bs->AddButton(safenew wxButton(parent, wxID_HELP)); // bs->AddButton(safenew wxButton(parent, wxID_HELP));
b = safenew wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon )); b = safenew wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon ));
b->SetToolTip( _("Help") ); b->SetToolTip( _("Help") );
#if wxUSE_ACCESSIBILITY b->SetLabel(_("Help")); // for screen readers
b->SetAccessible(safenew WindowAccessible(b)); // so that name can be set on a standard control
b->SetName(_("Help"));
#endif
bs->AddButton( b ); bs->AddButton( b );
} }