Bug 1453873: Stop firing accessible focus events for JAWS when combo box options are selected. r=MarcoZ
authorJames Teh <jteh@mozilla.com>
Fri, 13 Apr 2018 14:14:50 +1000
changeset 413116 ad1a87f7ffa532f18f6ced9f93a2f51c790f1b35
parent 413115 de2f038f711e379b9ac4b7eb85fb5387b532ffc7
child 413117 4afef4326f2ea2bb60d1ca65ee6b2f5d78d65713
push id33833
push useraiakab@mozilla.com
push dateFri, 13 Apr 2018 09:41:15 +0000
treeherdermozilla-central@260e4c83c8a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ
bugs1453873, 703198
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)
 {