From d2c112600d38f0894fe783f8dfd8861b5e604fce Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Thu, 25 Apr 2019 13:06:44 -0400 Subject: [PATCH] Bug1848: Mac VoiceOver should read names of choice controls... ... This should cover most of the neglected cases, where a choice was added by ShuttleGui. There are some places where choices are added directly: scan the soure for "safenew wxChoice" I think there are still uncovered cases then in Grid.cpp, LV2 Effects, and in commented-out parts of Transcription toolbar. Are these important? --- src/ShuttleGui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ShuttleGui.cpp b/src/ShuttleGui.cpp index 99703d833..d7aaec8ea 100644 --- a/src/ShuttleGui.cpp +++ b/src/ShuttleGui.cpp @@ -401,6 +401,10 @@ wxChoice * ShuttleGuiBase::AddChoice( const wxString &Prompt, Style( 0 ) ); pChoice->SetSizeHints( 180,-1);// Use -1 for 'default size' - Platform specific. +#if wxUSE_ACCESSIBILITY + // so that name can be set on a standard control + mpWind->SetAccessible(safenew WindowAccessible(mpWind)); +#endif pChoice->SetName(wxStripMenuCodes(Prompt)); if ( Selected >= 0 && Selected < choices.size() ) pChoice->SetSelection( Selected );