Manually Setting NSAccessibility Value on Mac for QAccessibleWidget?
-
Hi,
I'm a VoiceOver user, and QAccessible seems to have limited implementations for NSAccessibility Protocol on MacOS.
For example, if I set QAccessible:Help and examine it with accessibility inspector, none of the NSAccessibility properties has that value. Also VoiceOver doesn't read it if I press vo+shift+h which reads accessibilityHelp.
Is there a way to manually set values for NSAccessibility Protocol such as accessibilityRoleDescription, accessibilityHelp, and so on?
Being able to set NSAccessibility values will allow developers to improve accessibility on Mac immensely!
Thank you for your help! -
Hi and welcome to devnet,
What version of Qt are you using ?
What version of of macOS are you running ? -
Modifying the following QT source files and building from the source worked.
qtbase/src/plugins/platforms/cocoa/
qcocoaaccessibility.mm
qcocoaaccessibilityelement.mm -
Glad you found a solution !
Would you mind sharing the changes you made ?
You might even consider including them in Qt directly ?