Reputation: 67
I have checked almost all previous question related to my query but did not find my solution. I'm facing issue with Full keyboard access accessibility when integrate it with scrollview. Inside scrollview textfield and secure textfield are accessible with "tab" key but other component like buttons are not accessible using "tab" key.
but when I remove scrollview all elements are accessible with "tab" key.
Even in system installed iOS Apps they don't support scrollview with tab button, I have
analysed apple documentation regarding this but did not find specific to this.
https://fileport.io/WymhhSPWyZH5 : this video is with scrollview addedd and not able to access all buttons with tab key.
https://fileport.io/DkbeCussK7LP : this video shows without scrollview and all buttons can we accessed with tab key
Does anyone have idea regarding this kind of behaviour?
below is code with scrollview
import SwiftUI
struct ContentView: View {
@State private var name: String = ""
var body: some View {
ScrollView{
VStack {
TextField("Enter your name", text: $name)
.frame(height: 50)
.background(Color.white)
.foregroundColor(.black)
TextField("Enter your name", text: $name)
.frame(height: 50)
.background(Color.white)
.foregroundColor(.black)
TextField("Enter your name", text: $name)
.frame(height: 50)
.background(Color.white)
.foregroundColor(.black)
TextField("Enter your name", text: $name)
.frame(height: 50)
.background(Color.white)
.foregroundColor(.black)
TextField("Enter your name", text: $name)
.frame(height: 50)
.background(Color.white)
.foregroundColor(.black)
Button("Button example") {
print("Button tapped!")
}
.frame(height: 50)
Button("Button example") {
print("Button tapped!")
}
.frame(height: 50)
Button("Button example") {
print("Button tapped!")
}
.frame(height: 50)
Button("Button example") {
print("Button tapped!")
}
.frame(height: 50)
Button("Button example") {
print("Button tapped!")
}
.frame(height: 50)
}
.padding()
}
}
}
#Preview {
ContentView()
}
Upvotes: 1
Views: 321