summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/uiautomation
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2019-12-06 20:21:41 +0100
committerAndre de la Rocha <andre.rocha@qt.io>2019-12-10 05:46:45 +0100
commitb209270825cc2c3345d094e3dd547604c64e0b26 (patch)
tree1dd4cd33759b369f059d27960ba71266de2a6e09 /src/plugins/platforms/windows/uiautomation
parente40e82ede1660e6467291002862732a536558f08 (diff)
Windows QPA: Export "checkable" info for menu items through UI Automation
In order to allow screen readers to say checked/unchecked for checkable menu items, this information has to be provided through UI Automation. Checkable menu items should implement the "Toggle" UI Automation pattern. The "checkable" state must also be supported by QAccessibleMenuItem, which is being added by a separated change. Task-number: QTBUG-80551 Change-Id: I661668310d1b6b4701d0c0efdb1dcfd15d0db729 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/uiautomation')
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
index e5a9f275ae..cc293b777c 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
@@ -289,7 +289,8 @@ HRESULT QWindowsUiaMainProvider::GetPatternProvider(PATTERNID idPattern, IUnknow
break;
case UIA_TogglePatternId:
// Checkbox controls.
- if (accessible->role() == QAccessible::CheckBox) {
+ if (accessible->role() == QAccessible::CheckBox
+ || (accessible->role() == QAccessible::MenuItem && accessible->state().checkable)) {
*pRetVal = new QWindowsUiaToggleProvider(id());
}
break;