Build accessible apps with SwiftUI and UIKit

RSS for tag

Discuss the WWDC23 Session Build accessible apps with SwiftUI and UIKit

View Session

Posts under wwdc2023-10036 tag

2 Posts
Sort by:
Post not yet marked as solved
9 Replies
930 Views
Hello, Apologies if I don't follow protocol. This is my first time asking a question. I'm enjoying discovering Swift. I'm getting tan error after Form { and wonder if you might know how to resolve it. After Form { I receive the following error: "Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure." What am I doing wrong? Below is the entire RegisterView file. Thank you in advance for any assistance. How will I receive your response? I've not entered my email address anywhere? Here at 17:39 shows what it should look like: https://www.youtube.com/watch?v=pAB1tMH6TFc Lorna import SwiftUI struct RegisterView: View { @StateObject var viewModel = RegisterView_ViewModel() var body: some View { VStack { //Header HeaderView(title: "Register", subtitle: "Start organizing", angle: -15, background: .blue) Form { TextField("Full Name", text: $viewModel.name) .textFieldStyle(DefaultTextFieldStyle()) .autocorrectionDisabled() TextField("Email Address", text: $viewModel.email) .textFieldStyle(DefaultTextFieldStyle()) .autocapitalization(.none) .autocorrectionDisabled() SecureField("Password", text: $viewModel.password) .textFieldStyle(DefaultTextFieldStyle()) TLButton( title: "Create Account", background: .green ) { viewModel.register() } .padding() } .offset(y: -50) Spacer() } } } struct RegisterView_Previews: PreviewProvider { static var previews: some View { RegisterView() } } Thank you in advance for your help. Lorna
Posted
by LornaL.
Last updated
.
Post not yet marked as solved
1 Replies
420 Views
Hello. In order to test how VoiceOver treat isToggle accessibilityTraits, I created simple code. I did not use Toggle View, because of test purposes. By the way, I have a question. Once I applied isToggle, VoiceOver just says swich button. Switch means is toggle, we have to provide state information such as on or off. So I thought that to provide state information, such as on or off, I should use accessibilityValue. But even if I applied accessibilityValue, VoiceOver does not read the value, just speak swich button. How to provide on or off state with accessibilityTraits isToggle? Thank you.
Posted
by khsruru.
Last updated
.