1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-31 07:59:27 +02:00

Keyboard prefs accessibility: Narrator can misread the radio buttons.

Problem. If an item in the list is selected, then if a different view by radio button is selected, Narrator reads the selected item rather than the radio button.
KeyViewAx::SetCurrentLine(int line) can be called when the KeyView is not the focus, and send a focus event.

Fix: In KeyViewAx::SetCurrentLine(int line), only send focus event if the KeyView is the focus.
This commit is contained in:
David Bailes 2019-05-17 08:33:33 +01:00
parent ddaadfb7e7
commit 6da84b0adc

View File

@ -1931,10 +1931,12 @@ KeyViewAx::SetCurrentLine(int line)
LineToId(line, mLastId);
// Send notifications that the line has focus
NotifyEvent(wxACC_EVENT_OBJECT_FOCUS,
mView,
wxOBJID_CLIENT,
mLastId);
if (mView == wxWindow::FindFocus()) {
NotifyEvent(wxACC_EVENT_OBJECT_FOCUS,
mView,
wxOBJID_CLIENT,
mLastId);
}
// And is selected
NotifyEvent(wxACC_EVENT_OBJECT_SELECTION,