summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-03-27 22:38:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-29 00:40:46 +0100
commit0bd8cc831aac0ea19b97d1d1f9b590b719efefdc (patch)
treef2fd7c5284eea05b9a6b8a062088b74437184403 /src
parent214a3b093dae3f4d91403f830c0353edb87f4bd4 (diff)
Accessibility Mac: CheckBoxes need value attribute
Task-number: QTBUG-37921 Change-Id: I305f983f2fd96b52960060351402ff70a62c3a91 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index 0f99a414a0..990acd5301 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -298,7 +298,8 @@ bool hasValueAttribute(QAccessibleInterface *interface)
Q_ASSERT(interface);
const QAccessible::Role qtrole = interface->role();
if (qtrole == QAccessible::EditableText
- || interface->valueInterface()) {
+ || interface->valueInterface()
+ || interface->state().checkable) {
return true;
}
@@ -330,6 +331,10 @@ id getValueAttribute(QAccessibleInterface *interface)
return QCFString::toNSString(QString::number(valueInterface->currentValue().toDouble()));
}
+ if (interface->state().checkable) {
+ return [NSNumber numberWithInt: (interface->state().checked ? 1 : 0)];
+ }
+
return nil;
}