diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-05-30 13:02:45 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-07 14:54:39 +0200 |
commit | cd756e5ed55a7859eca354e898ea5a3039fcb2e6 (patch) | |
tree | caa6c20cddee6ebe0704b91803353a3a292ac2a6 /src/plugins/platforms | |
parent | a1c8c581ce590c1c3185fe4bb1d3b4851bdbfd33 (diff) |
Cocoa Accessibility: fix ignoring of objects
On Mac it's expected that some elements are
filtered out of the a11y hierarchy.
We do this with the shouldBeIgnored function.
The problem is that we would ignore some objects
and then return them in the child attribute function.
This is inconsistent and leads to voice over not working.
For example having a plain QWidget with other widgets as
children would cut off all of these widgets, since the
plain QWidget would be ignored.
Change-Id: I5f6c26b272e5ca57d59c1ed1ef47e9a2b1181295
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm | 6 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsviewaccessibility.mm | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm index f7c945c50d..55a23fda76 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm @@ -151,8 +151,7 @@ [kids addObject: element]; [element release]; } - // ### maybe we should use NSAccessibilityUnignoredChildren(kids); this needs more profiling - return kids; + return NSAccessibilityUnignoredChildren(kids); } else if ([attribute isEqualToString:NSAccessibilityFocusedAttribute]) { // Just check if the app thinks we're focused. @@ -272,8 +271,7 @@ // No child found, meaning we hit this element. if (!childInterface) { // qDebug() << "Hit test returns: " << id << iface; - return self; - //return NSAccessibilityUnignoredAncestor(self); + return NSAccessibilityUnignoredAncestor(self); } QAccessible::Id childId = QAccessible::uniqueId(childInterface); diff --git a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm index 6ebb1f6ba8..331a66417d 100644 --- a/src/plugins/platforms/cocoa/qnsviewaccessibility.mm +++ b/src/plugins/platforms/cocoa/qnsviewaccessibility.mm @@ -88,7 +88,7 @@ [element release]; } - return kids; + return NSAccessibilityUnignoredChildren(kids); } else { return [super accessibilityAttributeValue:attribute]; } |