mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Accessibility: make TrackPanel more accessible using Narrator
Problem: Using the Narrator screen reader on Windows 10, there are a couple of issues: 1. After making a change to solo/mute/selectedness, the name and state of the track is not automatically read. 2. Text sent to TrackPanelAx::MessageForScreenReader() is not read. Fixes: After a focus event, if the focus has not changed, Narrator does not read the name, even if the name has changed. So: 1. In TrackPanelAx::Updated(), add a name change event. (The focus event has been retained to keep Window-Eyes happy until we stop supporting it.) 2. In TrackPanelAx::MessageForScreenReader(), change the focus event to a name change event. Note the Window-Eyes does not read these messages anyway, because when the role is set to wxROLE_NONE it does not read the name. So there's no point in including a focus event for the benefit of Window-Eyes.
This commit is contained in:
@@ -191,12 +191,17 @@ void TrackPanelAx::Updated()
|
||||
auto t = GetFocus();
|
||||
mTrackName = true;
|
||||
|
||||
// logically, this should be an OBJECT_NAMECHANGE event, but Window eyes 9.1
|
||||
// does not read out the name with this event type, hence use OBJECT_FOCUS.
|
||||
// The object_focus event is only needed by Window-Eyes
|
||||
// and can be removed when we cease to support this screen reader.
|
||||
NotifyEvent(wxACC_EVENT_OBJECT_FOCUS,
|
||||
mTrackPanel,
|
||||
wxOBJID_CLIENT,
|
||||
TrackNum(t));
|
||||
|
||||
NotifyEvent(wxACC_EVENT_OBJECT_NAMECHANGE,
|
||||
mTrackPanel,
|
||||
wxOBJID_CLIENT,
|
||||
TrackNum(t));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -217,7 +222,7 @@ void TrackPanelAx::MessageForScreenReader(const wxString& message)
|
||||
mMessageCount++;
|
||||
|
||||
mTrackName = false;
|
||||
NotifyEvent(wxACC_EVENT_OBJECT_FOCUS,
|
||||
NotifyEvent(wxACC_EVENT_OBJECT_NAMECHANGE,
|
||||
mTrackPanel,
|
||||
wxOBJID_CLIENT,
|
||||
childId);
|
||||
|
||||
Reference in New Issue
Block a user