During the first months of the year, Igalia has been working on the accessibility support for Clutter, funded by Nokia.
The last weeks we were trying to coordinate how to release it, so I would like to thanks Rodrigo Novo and Quim Gil, in this task.
In the same way, I would like to thank Emmanuel Bassi for the interest he showed in this library, although he is busy enough with the work for the imminent Clutter-1.0.
Using the same scheme for GAIL and HAIL, this library is called CAIL, Clutter Accessibility Implementation Library.
The library was is called CALLY, that is is similar to Clutter + a11y, but avoiding the numbers (ca11y was suggested by Juan A. Suarez, Emmanuel Bassi suggested use “l” instead of “1”).
At this moment the library is really in its beginnings. It is small, and there are a lot of things still to implement, but it works, and allow to expose the different Clutter objects to an AT application. But, it is this moment the best one to start to get feedback from other people, specially from gnome accessibility guys, when we have a working library, but not a huge amount of code really hard to understand as whole.
The first question that arises is if we are approaching this in the correct level of abstraction. Clutter is oriented to be a drawing technology, so in theory the ideal thing should be to implement the a11y support directly on any new clutter-based toolkit. In some way, this is similar to the Gtk+/Gdk relation, and implement a11y support on the Gdk level. It is worth pointing out that because at this level we are mostly missing functional information (objects to interact directly with, like a button), all objects are mostly informative.
But we don’t have news about an hypothetical fancy toolkit (tidy is just an example) and applications are using directly clutter, and probably for a long time, so maybe a direct a11y support will be required, and the work done here could be reused in the future for upcoming toolkits.
But, apart from this philosophical reflections about the existence of CALLY, there are some implementation details that are debatable too (so any feedback is welcome):
GtkAccessible equivalent not implemented: the idea was to implement CALLY without modifying Clutter at all. It is enough for the moment
Window system information is required to implement AtkComponent, so it depends on the backend
Textures as buttons
- For the moment, it only supports the X11 backend
- There is no implementation done to manage multiple backends
- An option could be to add the backend support, like Clutter, but then, you need to be sure to install the correct flavor of CALLY with the correct flavor of Clutter.
- Other option to ensure a synchronization between Clutter and CALLY could be to compile both together, and integrate CALLY as a Clutter module, like GAIL on Gtk.
- After a fast review of SDL I didn’t find a way to implement AtkComponent properly. Is it viable on any backend?
AtkAction implemented on CallyActor
- ClutterActor has signals for “press” and “release”
- Any actor could be used as a button; the most used one is the ClutterTexture
- So the role should be different, ATK_ROLE_IMAGE==>ATK_ROLE_BUTTON, and the app should change that. The current experience is that they will not (or at least not easily).
- Solution: change it on initialization if we detect that it has a handler bound to these signals.
- As ClutterActor has signals for “press” and “release”, it makes sense to implement AtkAction on CallyActor
- So we should find a way to extend AtkAction implementation on subclasses
- Used the solution implemented on GailCell
- Maintain a list of action functions, and add a public API on CallyActor to add/remove that.
The interaction with GAIL is not clear. Or with other words: the a11y support for applications using Clutter and Gtk+ is not clear yet
- AtkObject uses a composite pattern. On GAIL GailContainer redefines these methods.
- On Clutter ClutterContainer is an interface, so several Clutter object could implement it
- Several AtkObject methods can be implemented in behalf of ClutterContainer.
- So currently, the implementation of these methods on CallyActor is conditional. On runtime, it checks if the Clutter object implement this interface
CALLY is using a module approach like GAIL.
- The existing a11y support for GtkClutterEmbed was not included, as was based on the assumption that the environment will be always using this widget
- Currently the applications are required to load this module by hand
- With GAIL you load it by using GTK_MODULES=gail:atk_bridge
- But there isn’t (AFAIK) CLUTTER_MODULES
- Anyway it is not clear if this could be the best option, as GTK_MODULES is causing some problems in other environments
An of course, a lot of missing functionality.
You can read a detailed list on the TODO file I included in the source code.
At this moment the code is in a public Igalia git repository. The idea is to move it someday to the clutter repository, but at this moment Emmanuele Bassi and other Clutter developers have a lot of work with the imminent Clutter-1.0 release, so we will try to improve CALLY meanwhile.
So, if you are interested, you can get the code here:
git clone http://git.igalia.com/cally.git
Update: After the Ron Thompson comment, the library was renamed from cail to cally. Sorry for the nuisance.