Accessibility Mac: CheckBoxes need value attribute

Task-number: QTBUG-37921

Change-Id: I305f983f2fd96b52960060351402ff70a62c3a91
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Frederik Gladhorn 2014-03-27 22:38:53 +01:00 committed by The Qt Project
parent 214a3b093d
commit 0bd8cc831a

View File

@ -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;
}