Sets accessibilityLabel on postalCodeField in STPPaymentCardTextField (#296)
* Sets accessibilityLabel on postalCodeField in STPPaymentCardTextField * Community credit in CHANGELOG
This commit is contained in:
parent
b26fe514a6
commit
7c74bcbdfb
|
@ -1,5 +1,6 @@
|
|||
## ?????
|
||||
* Fixes broken card scanning links. (Thanks [ricsantos](https://github.com/ricsantos))
|
||||
* Fixes accessibilityLabel for postal code field. (Thanks [romanilchyshyndepop](https://github.com/romanilchyshyndepop))
|
||||
* Improves compile time by 30% [#1846](https://github.com/stripe/stripe-ios/pull/1846) (Thanks [JonathanDowning](https://github.com/JonathanDowning)!)
|
||||
|
||||
## 21.7.0 2021-07-07
|
||||
|
|
|
@ -786,9 +786,12 @@ open class STPPaymentCardTextField: UIControl, UIKeyInput, STPFormTextFieldDeleg
|
|||
|
||||
func updatePostalFieldPlaceholder() {
|
||||
if postalCodePlaceholder == nil {
|
||||
postalCodeField.placeholder = defaultPostalFieldPlaceholder(forCountryCode: countryCode)
|
||||
let placeholder = defaultPostalFieldPlaceholder(forCountryCode: countryCode)
|
||||
postalCodeField.placeholder = placeholder
|
||||
postalCodeField.accessibilityLabel = placeholder
|
||||
} else {
|
||||
postalCodeField.placeholder = postalCodePlaceholder
|
||||
postalCodeField.accessibilityLabel = postalCodePlaceholder
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue