Thursday, February 22, 2007


warning: bad poetry follows:

popups that look like tooltips,
but act like dialog boxes,
links as buttons,
buttons as menus,
manipulate the DOM,
javascript inside,
a first class browser,
expose via accessibility,
venerable desktop roles and states,
navigate the wilderness,
challenge the rules,
break them,

Friday, February 16, 2007

Loading a XUL file in Thunderbird

Want the straight goods? Skip to the end.

I wrote a XUL test file to profile the impact of updating the accessible tree cache more frequently. The idea is to see if it is worth trying to optimize how we update the core tree accessible caches. I currently only regularly build Thunderbird trunk. So in order to run the test I needed to load the file in tbird. After poking around the GUI... no luck. I headed over to #maildev and #xul... mrfinkle and I chatted about how to solve the problem via the creation of an extension. He pointed me to a handy extension wizard, as well as information on using an extension in test mode. I'm noting this for a rainy day as I'm sure it will come in handy but I also heard from philor over on #maildev who had run into the same problem before and like me didn't want to create an extension just to test 1 file.

His solution? Set the start page in the preferences to be the XUL file. Nice.

Wednesday, February 14, 2007


I've been putting some major GOK issues on hold until I can give some proper attention. I think I can start allotting 1 day a week to GOK again starting next week. The GDM login issue needs closure and I need to review some xevie work from Bill and go over the committed libusb work from Ben. I really want to test that out.

We should probably really start figuring out ways to pull some of this great work out of GOK and into separate modules.

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.

Tbird Tracker

I added a Thunderbird accessibility tracker bug last night. I thought I'd just note it here so that I had it handy and in case others take interest.


Tomorrow I officially embark on another Mozilla funded project building ARIA, or "Accessible Rich Internet Applications". I will joining the dojo ARIA efforts of Becky and others.

Thursday, February 8, 2007

Mozilla source code contribution!

I'm happy to report that I've being finding more time lately to work on patches to fix Thunderbird accessibility issues. In fact...

My first patch finally went into the mozilla codebase today!

First the technical bits...

The patch makes an email message's graphical status indicators accessible. These indicators include things like read/unread status which is normally a small or large green dot. To achieve this I implemented GetCellValue for the XUL tree view (part of the nsITreeView interface, implemented in a C++ class known to tbird developers as msgDBView). Implementing GetCellText to return text for these status indicators would have created conflict between the text and the graphical icon. Implementing GetCellValue provided a way for the accessibility infrastructure to query for a textual representation of the various status areas (which I added to nsXULTreeitemAccessible::GetName).

The patch touched the following modules: accessible, dom, mail, mailnews.

Now the fuzzier bits...

I can't say enough about how welcoming this community has been to me, and it has been an absolute joy working with them. I think as I began my Thunderbird work I was too hesitant to seek help from the community for fear that I would draining valuable resources, but that perspective has changed and I think I can really help out here in the long term. That will probably have to wait however as it appears I am soon going to be doing some ARIA work, in particular, dojo accessibility! I'll post something on that later.

For me, this was a really interesting first bug fix.