Closed leopic closed 1 year ago
@leopic thanks for the PR - out of interest, does attaching an identifier to the ResponsiveTextView
using SwiftUI's accessibility APIs not work?
@lukeredpath it did not on my first attempt, let me try one more time before merging.
@leopic actually, I think this might be better served using the existing configuration system, which would allow you to configure as many accessibility properties as you need, for example:
public extension ResponsiveTextField.Configuration {
static func accessibile(identifier: String) {
$0.accessibilityIdentifier = identifier
// any other accessibility traits/properties set here
}
}
And then pass this in when creating the text field:
...
configuration: .accessible(identifier: "foo")
Or if you're already using a configuration:
...
configuration: .combine(.someExisting, .accessible(identifier: "foo"))
@lukeredpath it did actually work, my bad!
No need for this PR at all, but I did like your approach better, to be honest 😅 .
Thanks anyway.
While trying to write UI tests for a view using this package I realized there was no way to specify an identifier.