added accessibility text
This commit is contained in:
parent
0ec10715c6
commit
649a9361e4
@ -51,7 +51,11 @@ import UIKit
|
||||
guard let model = model as? LinkModel else { return }
|
||||
|
||||
setTitle(model.title, for: .normal)
|
||||
accessibilityLabel = model.title
|
||||
if let accessibilityText = model.accessibilityIdentifier {
|
||||
accessibilityLabel = accessibilityText
|
||||
} else {
|
||||
accessibilityLabel = model.title
|
||||
}
|
||||
setTitleColor((model.inverted ? model.enabledColor_inverted : model.enabledColor).uiColor, for: .normal)
|
||||
setTitleColor((model.inverted ? model.disabledColor_inverted : model.disabledColor).uiColor, for: .disabled)
|
||||
isEnabled = model.enabled
|
||||
|
||||
@ -188,6 +188,9 @@ open class PillButton: Button, MVMCoreUIViewConstrainingProtocol {
|
||||
|
||||
guard let model = model as? ButtonModel else { return }
|
||||
setTitle(model.title, for: .normal)
|
||||
if let accessibilityText = model.accessibilityIdentifier {
|
||||
accessibilityLabel = accessibilityText
|
||||
}
|
||||
|
||||
if let size = model.size {
|
||||
buttonSize = size
|
||||
|
||||
@ -63,6 +63,10 @@ import Foundation
|
||||
message += messageLabel
|
||||
}
|
||||
|
||||
if let accessibilityLabel = headlineBody.headlineLabel.accessibilityLabel {
|
||||
message = accessibilityLabel
|
||||
}
|
||||
|
||||
accessibilityLabel = message
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user