AccessibilitySnapshot icon indicating copy to clipboard operation
AccessibilitySnapshot copied to clipboard

Crash on iOS 26 tab bars

Open noahsmartin opened this issue 1 month ago • 0 comments

When trying to run some snapshot tests that work on iOS 18 on iOS 26 I get the following assertion failure:

AccessibilitySnapshotCore/AccessibilityHierarchyParser.swift:427: Precondition failed: UITabBar does not have the same number of tab views as tab items.

It looks like the code is trying to guess the location of the UITabBarButton view, and not finding it for the iOS 26 view hierarchy:

(lldb) po view.subviews[0].subviews[2].subviews
▿ 3 elements
  ▿ 0 : <_UITabButton: 0x11005e600; frame = (4 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000e5db00>>
  ▿ 1 : <_UITabButton: 0x107092a00; frame = (90 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000d19170>>
  ▿ 2 : <_UITabButton: 0x107056200; frame = (176 4; 94 54); tintColor = <UIDynamicCatalogSystemColor: 0x600001772a40; name = labelColor>; layer = <CALayer: 0x600000e60180>>

noahsmartin avatar Nov 14 '25 16:11 noahsmartin