Wednesday, February 14, 2007

XUL Trees, Localized Actions, TBird Tracker, and ARIA

I've closed a number of bugs since my last post but today was particularly fun.

XUL Trees

I made a breakthrough on a pesky focus bug which turned out to be a core problem. There is a clever caching mechanism in the accessibility infrastructure for storing and retrieving accessible objects (pointers really). Trees are special beasts which handle their own caches. It turns out the accessible objects stored in a tree's cache are hashed on the row and column (aRow * kMaxTreeColumns + columnIndex). Now the bug...

When a row was deleted, the remaining rows shuffled up (as rows tend to do when a row above them is deleted). So the next row in the tree (yeah I know "row in the tree" might sound funny) will now have same row index as the row which was deleted. Because the next row is focused by default it will cause a focus event to fire. The focus event fires and reports the accessible object to be the one it pulls out of the cache hashed on the row value (column won't be different). This object is erroneously the deleted row.

The fix? Well we need to update the cache when these kinds of DOM mutations occur. My current patch builds on Aaron's work to fire a new kind of dom event which results in a tree invalidation event which will cause a cache update.

What remains is to possibly optimize the cache updating strategy as well as to consider a more broad solution for other kinds of tree mutations.

Localized Actions

Accessible action names are no longer to be localized in mozilla. This came from discussion on the gnome-accessiblity-devel list on the thread "Are action names localized?". I'm currently assigned to this bug.