Bug 1453873: Stop firing accessible focus events for JAWS when combo box options are selected. r?MarcoZ draft
authorJames Teh <jteh@mozilla.com>
Fri, 13 Apr 2018 14:14:50 +1000
changeset 781566 eb79c7eb105277d0c0f7602010466b13581bd157
parent 780587 cfe6399e142c71966ef58a16cfd52c0b46dc6b1e
push id106343
push userbmo:jteh@mozilla.com
push dateFri, 13 Apr 2018 06:06:36 +0000
reviewersMarcoZ
bugs1453873, 703198
milestone61.0a1
Bug 1453873: Stop firing accessible focus events for JAWS when combo box options are selected. r?MarcoZ These events were a hack implemented in bug 703198. At that time, JAWS required focus events for selection changes in a collapsed combo box. However, these events also fire for expanded combo boxes. This is problematic with e10s because now, for an expanded combo box, the real focus events come from the XUL dropdown implemented in the parent process, which is not associated with the document a11y tree in any way. JAWS seems to cope just fine with value changes for Firefox combo boxes now and VFO have agreed that this is the correct path forward. MozReview-Commit-ID: Iefop25bFe0
accessible/windows/msaa/AccessibleWrap.cpp
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1212,26 +1212,16 @@ AccessibleWrap::FireWinEvent(Accessible*
   }
 
   if (IsHandlerInvalidationNeeded(winEvent)) {
     InvalidateHandlers();
   }
 
   // Fire MSAA event for client area window.
   ::NotifyWinEvent(winEvent, hwnd, OBJID_CLIENT, childID);
-
-  // JAWS announces collapsed combobox navigation based on focus events.
-  if (aEventType == nsIAccessibleEvent::EVENT_SELECTION &&
-      Compatibility::IsJAWS()) {
-    roles::Role role = aTarget->IsProxy() ? aTarget->Proxy()->Role() :
-      aTarget->Role();
-    if (role == roles::COMBOBOX_OPTION) {
-      ::NotifyWinEvent(EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, childID);
-    }
-  }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible
 
 nsresult
 AccessibleWrap::HandleAccEvent(AccEvent* aEvent)
 {