I’m trying to implement accessibility for my Qt application. I’m using NVDA (http://www.nvda-project.org/) and Freedom Scientific’s JAWS (http://www.freedomscientific.com/products/fs/jaws-product-page.asp) as the screen readers I want to support.
I’m assigning the widget’s accessibleName and accessibleDescription properties (http://doc.trolltech.com/4.7/qwidget.html#accessibleDescription-prop) in order to get the screen reader to read this information.
Example:
saveButton->setAccessibleName("save");
saveButton->setAccessibleDescription("Save the options you have entered above");
In both screen readers everything is working correctly when using the mouse. However, when focus changes in a widget all the readers read is “pane”. Why isn’t Qt providing the accessibility information that I need?
You have to import a plug-in to get Qt to have accessible widgets. This lets screen readers read the names, and hierarchies of objects.
To get this, you need to add qtaccessible widgets to your qmake project file:
And in main.cpp add a Q_IMPORT_PLUGIN
Then screen readers will be able to accurately read:
When you tab to (or otherwise place focus on) a button