summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-08 12:24:46 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-04-11 23:33:52 +0200
commit6b67c3e7384322ade9ea4b7c4c1be5d5b32779ec (patch)
treedb02db01f095cbb70dab81b58a1eabaf6794de5c
parent52c2b82082b535123c0eecafe1ec1e4e4190df2a (diff)
macOS Accessibility: flag all synthetic elements as unignored
This saves us a few more roundtrips. For rows and columns we could check if their accessibilityFrame instersects with the table and so ignore rows and columns that are outside of the view, but I'm observing weird corruptions in the list returned by NSAccessibilityUnignoredChildren when ignoring any objects. Task-number: QTBUG-34337 Pick-to: 6.5 Change-Id: Ia2d13fff463ff26abb39acfceafcfa0761171203 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
index 5beabcc0ba..d63c0401fd 100644
--- a/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
+++ b/src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
@@ -830,9 +830,10 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
// misc
- (BOOL)accessibilityIsIgnored {
- // Placeholders for cells should never be ignored, but we also
- // don't want to generate a QAccessibleInterface for them yet.
- if (synthesizedRole == NSAccessibilityCellRole)
+ // Short-cut for placeholders and synthesized elements. Working around a bug
+ // that corrups lists returned by NSAccessibilityUnignoredChildren, otherwise
+ // we could ignore rows and columns that are outside the table.
+ if (self.isManagedByParent)
return false;
if (QAccessibleInterface *iface = self.qtInterface)