Bug 468497: Inform the accessibility FocusManager when a XUL tree's view changes. r=MarcoZ
authorJames Teh <jteh@mozilla.com>
Thu, 05 Jul 2018 16:33:24 +1000
changeset 480358 4fd60abd9726046598d302b473106f7df33e66f1
parent 480357 13c926e6695891fe6a2a7145468e38b7eb08bc70
child 480359 8a7fd632104453b557ca73a335626d4f24427b50
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ
bugs468497
milestone63.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 468497: Inform the accessibility FocusManager when a XUL tree's view changes. r=MarcoZ Without this, accessibility clients don't get notified about the newly focused item. For example, this meant that nothing was reported by screen readers when switching tabs in Thunderbird with control+tab. MozReview-Commit-ID: F7vqvLXzeJR
accessible/xul/XULTreeAccessible.cpp
--- a/accessible/xul/XULTreeAccessible.cpp
+++ b/accessible/xul/XULTreeAccessible.cpp
@@ -655,16 +655,20 @@ XULTreeAccessible::TreeViewChanged(nsITr
   // each tree item.
   RefPtr<AccReorderEvent> reorderEvent = new AccReorderEvent(this);
   Document()->FireDelayedEvent(reorderEvent);
 
   // Clear cache.
   UnbindCacheEntriesFromDocument(mAccessibleCache);
 
   mTreeView = aView;
+  Accessible* item = CurrentItem();
+  if (item) {
+    FocusMgr()->ActiveItemChanged(item, true);
+  }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULTreeAccessible: protected implementation
 
 already_AddRefed<Accessible>
 XULTreeAccessible::CreateTreeItemAccessible(int32_t aRow) const
 {