GNOME Bugzilla – Bug 490266
Endless loop in navigating ARIA trees
Last modified: 2008-07-22 19:32:30 UTC
We are getting in an endless loop in the second while loop in gecko.getLineContentsAtOffset(). This is due to the fact that findNextCaretInOrder() returns the same exact item that was passed into getLineContentsAtOffset(), usually [list item | Fruits]. A solution to the problem is to remove the isAriaWidget() test in "if text and not self.isAriaWidget(obj):" at the top of findNextCaretInOrder(). However, this causes the listbox http://www.mozilla.org/access/dhtml/listbox to assume focus when navigating to it with the arrow keys. To Reproduce: 1) Go to the following URL http://test.cita.uiuc.edu/aria/tree/xhtml.php?title=Tree%20Example%201&ginc=includes/tree1a.inc&gcss=css/tree1a.css&gjs=../js/globals.js,../js/enable_app.js,js/tree1a.js 2) Navigate the tree for sometime, especially hitting the top tree item 'fruits'. 3) speech will stop and the CPU will peg indicating that you are stuck in the while loop.
The tab container seen here http://archive.dojotoolkit.org/dojo-2007-09-20/dojotoolkit/dijit/tests/layout/test_TabContainer.html also has a similar problem. In this case, the endless loop is in the the first while loop in getLineContentsAtOffset(). Unlike the tree problem, removing the isAriaWidget() in findNextCaretInOrder() does not fix the problem.
Created attachment 97931 [details] [review] first version of Endless loop in navigating ARIA trees Seems to fix the problems on the listbox and the mozilla tabpanel. However, right/left arrowing in dojo tabcontainer are not passed to the application. This may be a separate issue.
The latest dojo tabContainer does indeed work. I was looking at an older version of the tabContainer example, which was pre-ARIA role markup change.
This looks like a nice isolated fix. Mike please test.
Simple fix that prevents traversing into ARIA lists but still allows traversing other ARIA widgets that support the text interface. The end result is that the caret is moved just before a list and at the first child of non-lists (tabpanel is a good example).
After testing this last night and this morning I can find nothing wrong with it.
Committed to trunk. Marked as fixed.