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
Change-Id: Ia2d13fff463ff26abb39acfceafcfa0761171203
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 6b67c3e7384322ade9ea4b7c4c1be5d5b32779ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Volker Hilsheimer 2023-04-08 12:24:46 +02:00
parent f11c00ec6f
commit 0b28e08bfa

View File

@ -830,9 +830,10 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
// misc // misc
- (BOOL)accessibilityIsIgnored { - (BOOL)accessibilityIsIgnored {
// Placeholders for cells should never be ignored, but we also // Short-cut for placeholders and synthesized elements. Working around a bug
// don't want to generate a QAccessibleInterface for them yet. // that corrups lists returned by NSAccessibilityUnignoredChildren, otherwise
if (synthesizedRole == NSAccessibilityCellRole) // we could ignore rows and columns that are outside the table.
if (self.isManagedByParent)
return false; return false;
if (QAccessibleInterface *iface = self.qtInterface) if (QAccessibleInterface *iface = self.qtInterface)