summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2021-02-03 11:49:47 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-05 07:20:09 +0000
commitd482d8b1b5ecf447c41f47db140f1c9e15177477 (patch)
tree9b7144d6ffb972d70dc4610c50bd6a442b5963f5 /src/plugins/platforms
parentd0702bef50f6e8f468dccb2c724ea905d9d19ccc (diff)
a11y: Report mixed state if QCheckBox is PartiallyChecked
Previously it only returned checked or unchecked for a tri-state checkbox. Fixes: QTBUG-84616 Change-Id: Ife72098e35f8295fd389bda232de5478ffa7e87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f4887aca1e5ac7b90abf862d7c9828417a74a1b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index 585518628d..0f5c638f7c 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -389,6 +389,8 @@ id getValueAttribute(QAccessibleInterface *interface)
}
if (interface->state().checkable) {
+ if (interface->state().checkStateMixed)
+ return @(2);
return interface->state().checked ? @(1) : @(0);
}