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>
bb10
Volker Hilsheimer 2023-04-08 12:24:46 +02:00
parent 52c2b82082
commit 6b67c3e738
1 changed files with 4 additions and 3 deletions

View File

@ -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)