Not yet Accessible

Published Friday April 1st, 2011 | by

Lately I had the chance to research accessibility a bit. Qt supports high contrast color schemes and big fonts as they are set on the platform. Another aspect of accessibility are assistive technologies (AT). That means exposing what an application shows on screen so that an AT-client can interpret it differently. A screen reader can take this information and use speech synthesis to help users navigate the screen. There are several AT standards. The aim for Qt is to support the native interface on all its supported platforms. For Windows at the moment we support MSAA which is a bit dated, but works. For Linux the situation looked rather sad so far. While this is still a research project, the goal is to let Qt and KDE applications be accessible on the Linux desktop.


Watch on Youtube

Lately Orca (the Gnome screen reader) started to work with DBus and AT-SPI 2. With a QAccessibleBridgePlugin Qt can make use of this and provide the same interfaces. The plugin uses Qt’s internal implementation of IAccessible2 (another standard in the jungle of accessibility standards). This is currently work in progress but as you can see in the video, the basics are there.

For applications with custom widgets, the relevant part is to provide a QAccessiblePlugin. This is of course common to all platforms, so you only write it once and for the standard widgets it already comes with Qt.

If you are of the opinion only seeing hearing is believing, feel free to grab the plugin from gitorious: http://gitorious.org/qt-at-spi.

There is a catch of course: In order to use the plugin you need to have AT-SPI-2 working. Thanks to Mike Gorse and a few others the problems I ran into when testing AT-SPI2 were quickly fixed. The bridge is still eating kittens making applications crash.

Your have to install at-spi2-core, libatk-adaptor/at-spi2-atk, pyatspi2 and Orca. Accerciser can be a great help for debugging.

Tell gconf to use AT-SPI 2:

gconftool-2 --set /desktop/gnome/interface/at-spi-dbus --type bool true
gconftool-2 --set /desktop/gnome/interface/at-spi-corba --type bool false

Set some environment variables:

export GTK_MODULES=gail:atk-bridge
export QT_ACCESSIBILITY=1

Thanks to Will and Jonathan we already have some preliminary packages for Suse and Kubuntu. But as said above, it is still in a crashy state. Some fixes made their way into Qt’s master branch already (4.8).

For Qt and KDE applications what is needed now is testing and QAccessiblePlugins for widgets that don’t ship with Qt.

Did you like this? Share it:
Bookmark and Share

Posted in Accessibility, KDE, Labs, Qt | Tags: ,

4 comments to Not yet Accessible

Adam Higerd says:

Sure thing, I’ll drop a line to the rest of the Qxt developers so we can start work on QAccessible implementation for Qxt’s widgets.

Indigo Jo says:

Will a Qt app work, without modification, with standard accessibility tools such as Jaws (for blind users) and Dragon NaturallySpeaking (voice entry, particularly used by quadriplegics)? What about the Mac’s VoiceOver? I’ve tried out my own app with Windows Vista’s own voice recognition, and I could not enter text into the QTextEdit, which is the central widget in my app.

Uku says:

Interesting, can you guys use QtSpeech as voice source for Linuxes?

Frederik Gladhorn says:

@Indigo Jo: On windows Jaws should just work, since it can use MSAA. I don’t know Dragon, but voice entry could probably even bypass the AT system. If it does not work it’s a bug.

@Uku: Qt provides only the interface for screen readers and other AT-clients. Screen readers can make use of any speech synthesizer that is out there. This is a different layer.

Commenting closed.