cvs-health / ios-swiftui-accessibility-techniques

Demonstrates iOS SwiftUI Accessibility programming techniques using live good and bad examples that can be tested with VoiceOver and other AT. Includes documentation for developers explaining how to code accessible patterns for iOS.
Apache License 2.0
150 stars 13 forks source link

Error Validation: use .accessibilityValue matching the visible error message text for each invalid input #4

Open MarcSolo opened 8 months ago

MarcSolo commented 8 months ago

IMO, .accessibilityValue is another valid technique to expose an input's helper text and error message. Unlike .accessibilityHint, I don't think users can disable the announcement of an element's .accessibilityValue. This is why I think using .accessibilityValue may be a more robust approach.

My recommendation is to update the Error Validation coding technique (and associated documentation page) to include a "good" example that demonstrates how to use .accessibilityValue.

pauljadam commented 8 months ago

Thanks for the feedback! I've added that second good example using .accessibilityValue.

Will be out it in the App Store sometime today likely.