[Qt-interest] Accessibility problems in Qt
Dominik Wenger
domonoky at googlemail.com
Thu May 21 16:34:23 CEST 2009
Hello,
we are at moment testing a Qt Application for accessibility with Jaws
and Windows Narrator. Additionaly we use AccExplorer and AccEvent32 to
analyse how Qt behaves for a Screenreader on Windows.
We found a few Issues:
1. QComboBox doesnt announce changes to the Accessibility Layer, if you
use <up>/<down> on them.
AccEvent32 shows, that no accessibility events are sent.
This is because the Qt Code for the combobox misses the
updateAccessibilty() call.
-> This can easily fixed by adding a QAccessible::updateAccessibility(q,
0, QAccessible::ValueChanged); call to qcombobox.cpp -> setCurrentIndex().
2. QSpinBox and QDoubleSpinbox also dont speak on changes on <up>/<down>
keys.
AccEvent32 shows that for this, there are accessibilty events sent. But
these events dont have any named object, and Jaws doesnt speak them.
Further analysis showed, that this accessibility Events come from the
QLineEdit which is used internally in QSpinBox. And ofcourse this
QLineEdit doesnt have any name, as its internal to QSpinbox.
Additionally the accessibility code for the QSpinbox
(plugins/accessibility/rangecontrol.h/cpp) handles the Spinbox
completely (ie it handles all childs itself), so that the accessibility
layer doesnt event know about this hidden QLineEdit Object.
-> This is very difficult to fix, as adding a updateAccessibility() call
to QAbstractSpinBox::setValue() does send the correct event, and
Narrator is happy,but Jaws is still confused about the bogus events and
doesnt speak correctly. And if i modify QLineEdit, it wont work anymore
on its own.
Does anybody have a Idea how to fix this ?
3. QMenu doesnt speak correctly if you navigate with keys in it.
AccEvent again shows that there are also wrong events sent, when you
navigate in the Menu. This time, there are both correct and wrong Events
sent. But like for the QSpinBox, Jaws gets confused by the wrong events
and doesnt speak anything.
-> This seems to be fixed from Qt 4.5.0 -> Qt 4.5.1. Does anybody know
what changed in this area between those Versions ? As we cant use 4.5.1
because of other new bugs, but would like to Backport the fix.
4. QTabBar doesnt speak the Tab Titles and doesnt announce changes to
the accessibility Layer.
We havent really had time to analyse what really goes wrong in the Code,
but we made a little work around. (Which we want to replace by the
proper fix ofcourse). The Workaround is that we attach a function to the
currentIndex changed Signal, and change the accessible name of the
Tabbar to the current Title and call
updateAccessibility(QObject::sender(),0,Qaccessible::FocusChanged);
This makes it work, but is pretty ugly.
Did anyone analyse this more, to find out whats really wrong ?
Also i am wondering why this updateAccessibility is done in the normal
code. Wouldnt it be better to to this from the accessibility plugins ?
(attach to a signal, and inform the accessibility layer in behave of the
Widget)
I would be happy if anyone could help us out whith this, and it would be
very good if this fixes could go upstream once they are properly fixed,
so everybody benefits from it.
happy hacking,
Dominik Wenger
More information about the Qt-interest-old
mailing list