made credit card image accessible
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
1f0ba0cee6
commit
67a5663fc3
@ -135,6 +135,7 @@ extension InputField {
|
|||||||
fileprivate func updateLeftImage(_ inputField: InputField) {
|
fileprivate func updateLeftImage(_ inputField: InputField) {
|
||||||
let imageName = inputField.cardType.imageName(surface: inputField.surface)
|
let imageName = inputField.cardType.imageName(surface: inputField.surface)
|
||||||
creditCardImageView.image = BundleManager.shared.image(for: imageName)
|
creditCardImageView.image = BundleManager.shared.image(for: imageName)
|
||||||
|
creditCardImageView.accessibilityLabel = inputField.cardType.rawValue
|
||||||
}
|
}
|
||||||
|
|
||||||
override func updateView(_ inputField: InputField) {
|
override func updateView(_ inputField: InputField) {
|
||||||
@ -155,7 +156,7 @@ extension InputField {
|
|||||||
internal var creditCardImageView = UIImageView().with {
|
internal var creditCardImageView = UIImageView().with {
|
||||||
$0.height(20)
|
$0.height(20)
|
||||||
$0.width(32)
|
$0.width(32)
|
||||||
$0.isAccessibilityElement = false
|
$0.isAccessibilityElement = true
|
||||||
$0.translatesAutoresizingMaskIntoConstraints = false
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
||||||
$0.contentMode = .scaleAspectFill
|
$0.contentMode = .scaleAspectFill
|
||||||
$0.clipsToBounds = true
|
$0.clipsToBounds = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user