From 8e71ebca8712c3833cbc5d98baef72ad190f3183 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Thu, 12 Apr 2018 08:56:14 +0100 Subject: [PATCH] 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. --- src/ShuttleGui.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index 04f376e36..a09afa554 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -2290,10 +2290,7 @@ std::unique_ptr CreateStdButtonSizer(wxWindow *parent, long buttons, wx // bs->AddButton(safenew wxButton(parent, wxID_HELP)); b = safenew wxBitmapButton(parent, wxID_HELP, theTheme.Bitmap( bmpHelpIcon )); b->SetToolTip( _("Help") ); -#if wxUSE_ACCESSIBILITY - b->SetAccessible(safenew WindowAccessible(b)); // so that name can be set on a standard control - b->SetName(_("Help")); -#endif + b->SetLabel(_("Help")); // for screen readers bs->AddButton( b ); }