diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-08-03 17:35:03 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-08-22 08:42:52 +0000 |
commit | 15c608fb1202d93226a1cf95d96bf2d8008daf42 (patch) | |
tree | 9d1ed669908e938a7b12186679bf19b5c3bbab4d /src/plugins/platforms/cocoa/qcocoaaccessibility.mm | |
parent | 574c2e7feed83dfc1cf216497adf442bd7659b77 (diff) |
Accessibility: OS X: static text should have value instead of title
VoiceOver adds ", text" when reading QLabel when the Title instead of the
Value attribute is set.
Change-Id: Ic8f94844e858e490ec7e52856dccd4c0a09df88b
Reviewed-by: Boris DuĊĦek <me@dusek.me>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaaccessibility.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaaccessibility.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index 03f585d19d..56042e72ea 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -332,6 +332,7 @@ bool hasValueAttribute(QAccessibleInterface *interface) Q_ASSERT(interface); const QAccessible::Role qtrole = interface->role(); if (qtrole == QAccessible::EditableText + || qtrole == QAccessible::StaticText || interface->valueInterface() || interface->state().checkable) { return true; @@ -343,6 +344,9 @@ bool hasValueAttribute(QAccessibleInterface *interface) id getValueAttribute(QAccessibleInterface *interface) { const QAccessible::Role qtrole = interface->role(); + if (qtrole == QAccessible::StaticText) { + return QCFString::toNSString(interface->text(QAccessible::Name)); + } if (qtrole == QAccessible::EditableText) { if (QAccessibleTextInterface *textInterface = interface->textInterface()) { // VoiceOver will read out the entire text string at once when returning |