Frederik Gladhorn

Qt 5 Accessibility APIs

Published Monday June 18th, 2012
28 Comments on Qt 5 Accessibility APIs
Posted in Accessibility, Qt | Tags: , , , ,

Qt 5 is a very gradual and smooth update from Qt 4. There are generally no breaks in source compatibility, except where we felt that it’s absolutely necessary.
One area where we actually decided to do major changes that will affect people porting to Qt 5 is accessibility.
The reason is that we were really hindered in improving and modernizing Qt’s accessibility implementations on all platforms by the old state of the API.

For the moment we marked all accessibility APIs as internal. That means they are “hidden” and won’t show up in the documentation. This is because of the big changes where we are not quite sure that the new APIs have been tested enough. We feel that the Qt 5.1 release is the right time. But we have all enablers in place so that anyone willing to test should be good to go without any special setup. This means that while for the time being it’s undocumented you can expect it to work much better than in Qt 4 already.

The work on the new linux accessibility bridge with the help of users giving feedback showed us the limitations that we now tried to address as much as possible. The orginal API was inspired by MSAA which is the accessibility API that Windows 95 supported.
As you may guess, since then the world moved on and much happened in order to enable developers to support users better and of course enable users to make the best out of their computers. While we did not do any revolutionary changes, many details have been polished, the API is much cleaner and less error-prone. One huge improvement is how notifications are sent to the platform, finally providing enough details to the tools.

In Qt 5 after taking a step back we have improved platform integration on Mac, Windows and Linux. This will be the first Qt release which offers a good accessibility support on all desktops. We also extended our effort towards QML next to the traditional QWidget world. There are still some open questions, but the current system has actually already been tested extensively, for example in Unity-2d which is well liked by users of screen readers using Ubuntu, showing that QML and accessibility can go hand in hand.

For Mac we finally have a Cocoa backend instead of the dated Carbon one. This bridge (bridging the Qt accessibility APIs to the Mac API) is still young and fresh and thus needs your help in testing and polishing it.

The Windows accessibility bridge now supports IAccessible 2 next to MSAA which should give much better support for many elements such as tables and lists to the screen readers.

For Linux the new qt-at-spi bridge has been tested with Qt 4 and works with Gnome and KDE. For Qt 5 it has seen major improvements and will be merged to be shipped with Qt itself (as plugin), either for Qt 5.0 or 5.1.

Application developers should expect more accessibility features and better screen reader support out of the box on all platforms. It is to be expected that it’s not yet perfect, thus give us feedback. If you did support more extensive accessibility features and your own widget implementations subclassing QAccessibleInterface we’re especially keen on hearing from you. The documentation is all there, so feel free to read the comments in the .cpp files explaining the improved classes.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

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


Scorp1us says:

Thanks for the update. I can’t say I use accessibility though. But I do feel guilty about not using it.

HollaDieWaldfee says:

Oh oh, you mentioned QML in the post,
let the QML vs. C++ battle begin…

Thanks for working on Cocoa accessibility! I periodically receive negative comments and reviews due to lack of accessibility in Cocoa for Qt4. Hopefully I’ll be able to migrate my apps to Qt5 when 5.1 is out.

Mojorison says:

Pretty good ! And what about accessibility in QtWebkit ?

Christoph says:

Will the accessibility API in Qt 5.x cover the cases for accessibility server applications? For example, lets say I want to write a handwriting input panel application that automatically pops up whenever the user needs to type into text fields.

d3fault says:

Who cares about QML vs. C++? The question on everyone’s mind, after the weekend’s events, is the future of Nokia/Qt.

Looks like MS/Nokia have decided to go with the “pretend like nothing happened” PR maneuver. Cowards.
MAYBE they’ll release something actual over the next few days… but I’m not holding my breath

Accessibility? Really? Could you have picked something any less significant?

Oh and even though I said I wouldn’t, I couldn’t help but lmfao at this:
“We also extended our effort towards QML next to the traditional QWidget world. There are still some open questions, but the current system has actually already been tested extensively”

because if something is tested extensively, it must be good.


Qtler says:

Great to hear some positive news between all the bad news ๐Ÿ™‚

rocjohn says:

I will support Qt all the time!

Kessel says:

Great news – waiting patiently for Qt 5 ๐Ÿ˜‰

fritz_van_tom says:


you’re the biggest prick here on the forum. just trolling around about qml and every new development in Qt, not accepting a single argument someone else gives.

“Accessibility? Really? Could you have picked something any less significant?”
do you hate handicapped people? this is very important

“because if something is tested extensively, it must be good.”
i bet everyone involved with this new accessibility api has a lot more sense of software engineering than you do. so yes, it’s most likely good even at it’s young age.

if the new developments in Qt are pissing you off i’m very happy about it. you are not wanted.

Kessel says:


โ€žDon’t Feed The Trollโ€œ ๐Ÿ˜‰

Frederik Gladhorn Frederik Gladhorn says:

@Mojorison QtWebKit is indeed a good question. I worked on a patch a while ago, but could never find enough time to polish it. It turns out that it’s not all that hard for webkit 1 and I didn’t yet look into webkit 2 where the out of process nature gives some interesting challenges. There are some different ideas how to go about it floating around. I suppose it will eventually get there ๐Ÿ™‚ (

Frederik Gladhorn Frederik Gladhorn says:

@Christoph the virtual keyboard is generally handled by the input methods which have also seen big improvements (for example for touch screen use) which apply also on the desktop. Check out the sources for QInputPanel for example.

MJ says:

I’m learning iphone SDK now, but I felt Qt is much easier to understand and use. (Especially the confusing ObjectiveC language and delegates etc.). I am sure many people(C++ fans) will choose QT if you port it to iOS platform.

Roland says:

@d3fault Your point is valid

Daniel Kihlberg repeatedly blogged here that the next billion Phones would be coming and therefore we should all continue to invest in Qt. Now Meltemi was canceled and developers were fired. I find Daniel owes the developer community a comment that explains Nokias future strategy for Qt.

d3fault says:

I’m not trolling. If I were I’d be failing miserably. I’m merely expressing my opinions without a company telling me what I can and cannot say. It’s called freedom of speech, try it sometime (if there isn’t at least one person that thinks you’re an a-hole, you’re doing it wrong). Just because you’re getting butthurt doesn’t mean there aren’t lots of others that agree with me.

That goes to you too
First of all, give me a single technical argument in support of QML. I’m dying to hear one.
Second, I do not hate cripples (though I refuse to be politically correct about it. I thought about using the word ‘Disabled’ and then playing the PC card on you… but nah, I have no risk of being fired). In fact I think programming would be a great hobby for someone blind, for example. I could see them becoming obsessed with it. I know I would (am). I try to keep them in mind when designing and also have some concepts I want to try out in future products.

Re: you not wanting me
I don’t want to be wanted. I want to want [Qt, not you]. This is why I’m voicing my opinions.


sebsauer says:

For completeness some applications that are using the QAccessible2 framework.0

Kate, an advanced editor component which is used in numerous KDE applications requiring a text editing component:

Konsole, KDE’s terminal emulator:

p.s. fantastic work Frederik!

qJansen says:

I never thought about accessibility in my applications before I read this blog post. Great to read something about the stuff in Qt that is normally not so much in the focus – Thank you.

s3gfault says:

d3fault is correct in voicing his opinions. Daniel owes an explanation. He posted many blogs on the next billion and now he has gone all quiet.

Daniel & Lars, you owe an explanation to the community to post an update on what is the future of Qt both within and outside Nokia. If the answer is “we don’t have a clue/we are figuring it out/Qt is going to die horribly etc”, atleast say that!

David Johnson says:

I have strong opinions on Qt vs QML, but frankly it doesn’t belong here in a thread about accessibility. So I won’t voice them.

dude looks like a lady says:

I guess nobody owes anybody anything. But it still would be nice to hear the thoughts of the trolls. I too would appreciate an honest statement.

Mojorison says:

@frederik : It will be great because HTML5 with ARIA provides a nice accessibility level, but QtWebkit doesn’t work with at. I’ll try your patch, thanks for the link.

Frederik Gladhorn Frederik Gladhorn says:

@Mojorison: the patch is not in a working state. It needs more time to figure out a few details such as getting the life-time of the accessible objects right and how to use the system notifications. It just shows that it’s generally possible and we’re not missing too much infrastructure.

Alexis Menard says:

@s3gfault, d3fault, Roland: You want to get explanations about Qt and Nokia. Fair but you don’t need to comment about that here as it is not the place. At least one of you commented on the interest mailing list so the community heard you. Now you guys bashing here about unrelated content or the work done, it is very sad to hear. It’s a lack of respect against Frederik and others involved on making Qt a better framework and working on features that are maybe not important for you guys but are for a fair number of people.

To d3fault in particular : we’re fine with you not working in any company and having freedom to speech but it needs to be respectful, polite and well worded even for criticism. Whenever I read your messages that you literally spam everywhere possible I (and I know may others) dislike your wording, your arrogance, especially from someone who post to the dev mailing list but doesn’t do actual development/contributions to Qt (or at least I couldn’t find any evidence of it). You may say you’re not here for me to like you but hey you’re not here to pollute everyone’s work because WE DO STUFF here, and we’re not also here to hear your annoying comments, juvenile suggestions, and most of them incorrect. Maybe in all the noise you make some of your sentences have good points but today the ratio crap/arrogance/disrespect against the community vs constructive arguments and concerns is too low in the wrong direction. Please, Please, Please, go away or change your wording, you are not helping the community, you are not helping Qt and it goes against what you want : Qt.

So for all who worked on the accessibility, great job, keep going!

Kessel says:

@Alexis Menard

I know how difficult it is to simply ignore such aggressive posts. But I think there is only one solution: simply ignore these posts even if you would like to freak out. Answering these posts will only cause more trolling – you will see. So please โ€ždonโ€™t feed the trollโ€œ

Ratin says:

am having a horrible experience with QT on Ubuntu 12.04, cant bring up my project (it decides to go full screen and nothing shows up other than the menues, it says my project s already open – but all i can see is Getting started pages). It was working even yesterday and now this. Not to mention it randomly crashes when it works. Its incrementally getting worse and worse. A lot of weirdness with QT, even a 10 year old Msoft visual studio is better than this.

DerekDomino says:

@Frederik, do you know when the Cocoa support will be ready (ie when Qt 5/5.1 will be out?)

Frederik Gladhorn Frederik Gladhorn says:

@DerekDomino – I’m not entirely sure what the status is, it is in Qt 5.0, the question is how complete and usable it is. It would be best to get some feedback and bug reports on this. If you have a Qt application, compile it with Qt 5 and give us feedback.

Commenting closed.

Get started today with Qt Download now