From 0bd8cc831aac0ea19b97d1d1f9b590b719efefdc Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 27 Mar 2014 22:38:53 +0100 Subject: Accessibility Mac: CheckBoxes need value attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-37921 Change-Id: I305f983f2fd96b52960060351402ff70a62c3a91 Reviewed-by: Jan Arve Sæther --- src/plugins/platforms/cocoa/qcocoaaccessibility.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3