Improvements to accessibility names in Change Tempo effect.

The change tempo effect was modified in commit 8e0089c.
The most significant change is to include the "from" length in the accessibility name of the "to" length textctrl. (The nvda screen reader cannot access the value of the "from" length textctrl, and it's not straightforward using Jaws. Note that this issue existed before the recent change of Change Tempo.)

There remains a minor issue of Jaws, but not NVDA reading the names of wxStaticBoxes, and so some repetition in what is read by Jaws.
This commit is contained in:
David Bailes 2016-08-16 13:57:19 +01:00
parent 1cad18c479
commit 19fa6d2833
1 changed files with 6 additions and 4 deletions

View File

@ -229,13 +229,13 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
FloatingPointValidator<double> vldFromBPM(3, &m_FromBPM, NUM_VAL_THREE_TRAILING_ZEROES | NUM_VAL_ZERO_AS_BLANK);
m_pTextCtrl_FromBPM = S.Id(ID_FromBPM)
.AddTextBox(_("from"), wxT(""), 12);
m_pTextCtrl_FromBPM->SetName(_("From beats per minute"));
m_pTextCtrl_FromBPM->SetName(_("Beats per minute, from"));
m_pTextCtrl_FromBPM->SetValidator(vldFromBPM);
FloatingPointValidator<double> vldToBPM(3, &m_ToBPM, NUM_VAL_THREE_TRAILING_ZEROES | NUM_VAL_ZERO_AS_BLANK);
m_pTextCtrl_ToBPM = S.Id(ID_ToBPM)
.AddTextBox(_("to"), wxT(""), 12);
m_pTextCtrl_ToBPM->SetName(_("To beats per minute"));
m_pTextCtrl_ToBPM->SetName(_("Beats per minute, to"));
m_pTextCtrl_ToBPM->SetValidator(vldToBPM);
}
S.EndHorizontalLay();
@ -251,7 +251,6 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
FloatingPointValidator<double> vldFromLength(precission, &m_FromLength, NUM_VAL_TWO_TRAILING_ZEROES);
m_pTextCtrl_FromLength = S.Id(ID_FromLength)
.AddTextBox(_("from"), wxT(""), 12);
m_pTextCtrl_FromLength->SetName(_("From length in seconds"));
m_pTextCtrl_FromLength->SetValidator(vldFromLength);
m_pTextCtrl_FromLength->Enable(false); // Disable because the value comes from the user selection.
@ -266,7 +265,6 @@ void EffectChangeTempo::PopulateOrExchange(ShuttleGui & S)
vldToLength.SetRange(minLength, maxLength);
m_pTextCtrl_ToLength = S.Id(ID_ToLength)
.AddTextBox(_("to"), wxT(""), 12);
m_pTextCtrl_ToLength->SetName(_("To length in seconds"));
m_pTextCtrl_ToLength->SetValidator(vldToLength);
}
S.EndHorizontalLay();
@ -308,6 +306,10 @@ bool EffectChangeTempo::TransferDataToWindow()
m_bLoopDetect = false;
// Set the accessibility name here because we need m_pTextCtrl_FromLength to have had its value set
m_pTextCtrl_ToLength->SetName(_("Length in seconds from") + wxT(" ") + m_pTextCtrl_FromLength->GetValue()
+wxT(", ") + _("to"));
return true;
}