1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00

Bug 2169 - Modules page of preferences is not read by NVDA

This is caused by the same problem that caused bug 1980. This was fixed for check boxes by commit 42efe53.
Note that the bug in NVDA's audacity appmodule affects controls with the class button: button, check boxes, radio buttons and group boxes.

The fix is similar to the fix for bug 1980:
For group boxes which have an empty label, set the accessibility name to "\a", which is non-empty, but not read by screen readers.
This commit is contained in:
David Bailes 2019-07-22 11:12:15 +01:00
parent de12b9522b
commit 43145e0a49

View File

@ -793,7 +793,15 @@ wxStaticBox * ShuttleGuiBase::StartStatic(const wxString &Str, int iProp)
wxStaticBox * pBox = safenew wxStaticBoxWrapper(GetParent(), miId,
Str );
pBox->SetLabel( Str );
pBox->SetName(wxStripMenuCodes(Str));
if (Str.empty()) {
// NVDA 2018.3 or later does not read the controls in a group box which has
// an accessibility name which is empty. Bug 2169.
#if wxUSE_ACCESSIBILITY
// so that name can be set on a standard control
pBox->SetAccessible(safenew WindowAccessible(pBox));
#endif
pBox->SetName(wxT("\a")); // non-empty string which screen readers do not read
}
mpSubSizer = std::make_unique<wxStaticBoxSizer>(
pBox,
wxVERTICAL );