Skip to content

Commit

Permalink
macOS Accessibility: flag all synthetic elements as unignored
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
  • Loading branch information
vohi committed Apr 11, 2023
1 parent 52c2b82 commit 6b67c3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plugins/platforms/cocoa/qcocoaaccessibilityelement.mm
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,10 @@ - (void)accessibilityPerformAction:(NSString *)action {
// 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)
Expand Down

0 comments on commit 6b67c3e

Please sign in to comment.