Hello,
I found that if you apply the new .sidebarAdaptable
tab view style, the accessibility identifiers of tab bar buttons are missing.
import SwiftUI
struct ContentView: View {
var body: some View {
TabView {
Tab("Received", systemImage: "tray.and.arrow.down.fill") {
Text("Received")
}
.accessibilityIdentifier("tab.received") // 👀
Tab("Sent", systemImage: "tray.and.arrow.up.fill") {
Text("Sent")
}
.accessibilityIdentifier("tab.sent") // 👀
Tab("Account", systemImage: "person.crop.circle.fill") {
Text("Account")
}
.accessibilityIdentifier("tab.account") // 👀
}
.tabViewStyle(.sidebarAdaptable) // 👈 if remove this, ax identifiers are ok
}
}
#Preview {
ContentView()
}
The identifiers automatically appear after a few seconds. But this behaviour breaks a lot of the UI test cases.