[Accessibility] [Acessibility] Some questions

Andrei Tuicu andrei.tuicu at gmail.com
Tue Jul 22 00:27:09 CEST 2014

Hello, Frederik! :)

Thank you for your reply!

First of all I want to answer regarding the platform and the screen-reader.
I'm curently working on Windows 7 and using NVDA for testing, but MuseScore
is a crossplatform project that work on Windows, Linux and Mac, so the end
goal is to provide accessibility for every platform. For the moment I would
be happy if I can make everything work on Windows with NVDA and Linux with

>  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?
>       this->setValue(value()+10);
>       QAccessibleValueChangeEvent event(this, value());
>       QAccessible::updateAccessibility(&event);
> 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.

I already sent a bug-report for this problem, you can find it here:
I've also submited there my "crash dummy" project. Since MuseScore is a
huge project, I've created this small one just for understanding Qt
Accessibility API.

>   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.

So the widget doesn't need to have focus when I'm calling the the
updateAccessibility method, but the screen-reader will see this update only
when receiving focus? (sorry, I got a bit confused here. :) )

  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.

I would really apreciate more info here. Any informations that you can tell
me, or more docs that I can read would be very helpfull. For the part that
I'm working now (as I said in another email) I'm only working with QObjects
and there is where I have problems. In the small project that I've sent to
you above, I've also implemented the QAccessibleInteface for a QObject and
I included it in a tree ierarchy, but I don't receive any  feedback for it.

>   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.

The reason why I'm asking this is because this would be the simplest
solution to my problem. I have a lot of QObjects in one QWidget and a
custom made selection/highlighting system. What I need is to provide real
time feedback for the user, that's why I put so much accent on the
updateAccessibility method and how it works. When the user selects a score
element (for example note) I need the screen-reader to tell him the
informations that I'm providing in that moment (using the same example
"Note, Pitch A#, etc") without involving any focus changes.
I'm filling a bug report for this now, as you suggested.

One more question: I've tried looking myself in the source code of Qt to
see how are things done, but I've found more than one place for same
things. Where should I look? In qt/qt or qt/qtbase?

 Thank you very much!
Andrei Tuicu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/accessibility/attachments/20140722/896bc692/attachment.html>

More information about the Accessibility mailing list