From 981bdbb94905f665bf16839d05416c625ed8ae76 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Mon, 25 May 2015 13:53:44 +0100 Subject: [PATCH] Fix to stop the nvda screen reader reading out the name of the track twice when TrackPanelAx::Updated() is called. Prior to the fix, both a namechange and a focus event was generated. After the fix, only a focus event is generated. Tested using the latest versions of Jaws, window-eyes, nvda, and also Jaws 11. --- src/TrackPanelAx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TrackPanelAx.cpp b/src/TrackPanelAx.cpp index 6c0524ded..2099024d5 100644 --- a/src/TrackPanelAx.cpp +++ b/src/TrackPanelAx.cpp @@ -162,11 +162,13 @@ void TrackPanelAx::Updated() { #if wxUSE_ACCESSIBILITY Track *t = GetFocus(); - NotifyEvent(wxACC_EVENT_OBJECT_NAMECHANGE, + + // 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. + NotifyEvent(wxACC_EVENT_OBJECT_FOCUS, mTrackPanel, wxOBJID_CLIENT, TrackNum(t)); - SetFocus(t); #endif }