[Accessibility] [Acessibility] Some questions

Gladhorn Frederik Frederik.Gladhorn at digia.com
Mon Jul 21 23:26:55 CEST 2014

Hello Andrei,

On 18 Jul 2014, at 00:36, Andrei Tuicu <andrei.tuicu at gmail.com<mailto:andrei.tuicu at gmail.com>> wrote:

Hello everyone!

My name is Andrei Tuicu and I'm a GSOC student working on accessibility support for MuseScore. http://musescore.org/

I hope this is the right place to ask this questions. :)

That’s a great project, I’m happy to hear that more projects are taking accessibility serious :)
Feel free to ask away and I’ll try to answer as much as I can.

I have some problems with the Qt Accessibility API, maybe some of you can help me with them.

So first of all, my main problem is that I can't seem to be able to get any new feedback from the screen reader when calling the QAccessbile::updateAccessbility static method.

For example, I have a Custom class that inherits QSlider and I'm updating the value of the slider. Shouldn't this code make the screen-reader tell the new value of the slider?


      QAccessibleValueChangeEvent event(this, value());


Am I doing something wrong here?

The code looks good to me. The problem is more that there are so many norms and ways of using the different accessibility APIs. Qt aims to work on all platforms, but there has been a lot more usage and testing of these APIs in the last one or two years, so you might just hit bugs.
This really depends on the screen reader. Which platform/screen reader are you testing with and which Qt version?
There were a few fixes in Qt 5.4 for Windows and on Linux some fixes went into Orca because of bugs exposed by Qt.

If you can’t get it to work, file a bug on bugreports.qt-project.org<http://bugreports.qt-project.org>.

Other questions:

1. Must a widget have focus when  QAccessible::updateAccessibility method is called?

No, but again, the behavior is completely platform dependent, most screen readers try to not drown the user in useless messages, so often they won’t announce the value change. Doing the update is still important, for example Orca on Linux (or rather AT-SPI) caches a lot and then will read wrong values later on when the widget receives focus.

2.   If the answer to the previous question is yes, how can I make the screen-reader see the informations for QObjets since they can't get focus?

It doesn’t have to be the real focus, but you’d have to implement a custom QAccessibleInterface subclass (and register a factory function for it). That interface can return true for the focus state, but it should of course be consistent with the application’s state in some way.
Sending updates for QObject subclasses is fine as long as they have a QAccessibleInterface representation.

Let me know if you need more info or if the docs are not complete enough.

3. Is there a way to send a string to the screen-reader and say something like "read this". From what I read through the documentation, it doesn't seem to be, but I think it would be a nice addition for sending messages to the user. :)

There isn’t, but I’ve had a few situations where I wanted this as well. It really depends on the platforms again, but I think it makes sense. Please file a bug so we can discuss the API there and won’t forget about this. I know that it’s available on several platforms (iOS recently added this kind of feature) but haven’t looked into it for real.

You can also have a look at existing accessibility issues:

Please use GUI: Accessibility so I see new issues that you file.


Thank you!

Best regards,

Andrei Tuicu

Accessibility mailing list
Accessibility at qt-project.org<mailto:Accessibility at qt-project.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/accessibility/attachments/20140721/14bb0b00/attachment.html>

More information about the Accessibility mailing list