cashapp / AccessibilitySnapshot

Easy regression testing for iOS accessibility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snapshots on iOS 16 sometimes show activation point unexpectedly

NickEntin opened this issue · comments

Adding iOS 16 to our project's test config yielded many new crosshair overlays on buttons. There may be a pixel-rounding change that AccessibilityHierarchyParser.defaultActivationPoint(for: ) needs to take into account. And on that note, that method could be sensitive to text fields that are first responder (where the activation point is on the insertion bar rather than the center of the view).

Originally posted by @pwesten in #117 (comment)

Reproduced this on iOS 17. Looks like it's sub-pixel offsets.

(lldb) po activationPoint
▿ (173.0, 425.83333333333337)
  - x : 173.0
  - y : 425.83333333333337
(lldb) po defaultActivationPoint(for: element.object)
▿ (172.91666666666666, 426.0)
  - x : 172.91666666666666
  - y : 426.0