Home > Accessibility, programming, Qt > MSAA And IA2 Accessibility In Qt

MSAA And IA2 Accessibility In Qt

A few months ago I was approached by someone who wanted to have a fairly basic app developed. Nothing special there. What was special was that this person is blind and required the application to work well with his favourite screen-reader software (Window Eyes). After an initial meddling around with a basic Win32 GUI application I decided that I could much more easily do this in Qt, assuming that accessibility there worked as intended. This resulted in a quick and messy crash course into accessibility with the Qt framework.

To immediately start off with the most important lesson: forget about accessibility with Qt 4.8 and lower. This version of the framework only has partial MSAA (MicroSoft Active Accessibility) support, the API Microsoft first introduced with Windows 95 Service Release 2 (SR2) to interface with screen and braille readers, among other technologies. The MSAA support in Qt 4 is limited to some main GUI elements, but omits lists and other crucial views. As a result only the most basic, stripped-down Qt 4 applications will work via the MSAA API.

There’s hope, however. With Qt 5 accessibility has been majorly improved. Not only has MSAA been improved to the point where it’s pretty much fully accessible, but the IAccessibility2 API has also been added, which is a third-party accessibility API more recently introduced. This latter API is most easy to use with Qt 5 applications, though MSAA doesn’t require much more work either.

Basically all you need to do to enable accessibility in your application is to set the ‘Accessible name’ and ‘Accessible description’ for relevant widgets in your application’s GUI (check the property list in Qt Designer/Qt Creator with the GUI file open). Then, when deploying the application make sure you have a folder named ‘accessible’ in your application’s folder with the executable and the file ‘qtaccessiblewidgets.dll’ (or comparable .so) in that accessible folder. This will cause the Qt 5 application to load the accessibility features for its widgets and enables MSAA and IA2.

During testing and experimenting I have used both the Window Eyes and NVDA screen readers in Windows 7 x64 and Windows XP. It was found that NVDA already works with Qt 5 applications, likely via its IA2 interface, but that Window Eyes needed to have its Qt accessibility support improved due to it only supporting MSAA. I worked together with the creators of Window Eyes – GWMicro – on this improvement, resulting in a new build which works great for both me and the client. This new build will soon become available as an update for Window Eyes customers.

So after a few months of trial and error at long last this application is done and working for the client. Would it have been better to just go ahead with the Win32 API version? I’m not sure. First of all it would have represented its own share of issues, especially with regard to the implementation of the application’s other features which Qt’s object-oriented, message-slot-based architecture makes a snap. As a result of this struggle it seems that everyone came out ahead; for myself the added knowledge of accessibility in Qt, my client with an improved screen reader which now supports all Qt 5 applications which load that DLL I mentioned, and GWMicro which now has a better product.

In summary, Qt 5 accessibility support is pretty darn easy and well-supported these days, whether using the MSAA or IA2 API. As far as I’m concerned it’s worth a good look for your next project.


  1. kalebcoberly
    May 3, 2013 at 4:13 AM

    Hey Maya, I wrote a little review on your site, but I’m moving my blog to blogspot.

    So, here it is: http://whatisaprogrammertodo.blogspot.com/2013/05/mayas-programming-blog-attempt-at.html


    • May 3, 2013 at 6:51 AM

      Thank you for the interesting review, Kaleb 🙂

      • kalebcoberly
        May 3, 2013 at 7:02 AM


  2. November 18, 2013 at 5:51 AM

    Do you know if setting text value in a QT LineEdit control (or any text box control for that matter) is supported? I am not able to use settextvalue LDTP functionality to set text value of any QT control. I posted this. http://qt-project.org/forums/viewthread/34982/

  1. May 2, 2013 at 7:49 AM

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: