summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-03 21:34:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-16 16:50:59 +0200
commitae6f9d00a65de227dfb908672aa01a406a1c5c43 (patch)
treef5e87f14ed0ac51b6b7f87e1495305f95f4981af /src/plugins/platforms/cocoa/qcocoaaccessibility.mm
parent6300caf01fd79df48c516dd3882028a26b5fe4b4 (diff)
Accessibility Mac: Enable ignoring of children
The ignored children do not show up in the hierarchy, this should improve performance significantly. Previously the code would ignore the grouping property which seems to break QGroupBox. Change-Id: I4535af9c95bce76ded65f6d40fe07f17f3acffad Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaaccessibility.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibility.mm8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
index 34192e85b0..25780e79f4 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm
@@ -180,7 +180,8 @@ bool shouldBeIgnored(QAccessibleInterface *interface)
// state. Ignore interfaces with those flags set.
const QAccessible::State state = interface->state();
if (state.invisible ||
- state.offscreen)
+ state.offscreen ||
+ state.invalid)
return true;
// Some roles are not interesting. In particular, container roles should be
@@ -189,12 +190,13 @@ bool shouldBeIgnored(QAccessibleInterface *interface)
if (role == QAccessible::Border || // QFrame
role == QAccessible::Application || // We use the system-provided application element.
role == QAccessible::MenuItem || // The system also provides the menu items.
- role == QAccessible::ToolBar) // Access the tool buttons directly.
+ role == QAccessible::ToolBar || // Access the tool buttons directly.
+ role == QAccessible::Pane || // Scroll areas.
+ role == QAccessible::Client) // The default for QWidget.
return true;
NSString *mac_role = macRole(interface);
if (mac_role == NSAccessibilityWindowRole || // We use the system-provided window elements.
- mac_role == NSAccessibilityGroupRole ||
mac_role == NSAccessibilityUnknownRole)
return true;