refactored out broken accessibility for notification
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
880245d94e
commit
d1a320d44b
@ -247,6 +247,11 @@ open class Notification: View {
|
||||
subTitleLabel.textColorConfiguration = textColorConfiguration.eraseToAnyColorable()
|
||||
|
||||
//TODO: Need to add setup animation for displaying the Notification view for iOS.
|
||||
isAccessibilityElement = false
|
||||
accessibilityElements = [closeButton, typeIcon, titleLabel, subTitleLabel, buttonGroup]
|
||||
closeButton.accessibilityTraits = [.button]
|
||||
closeButton.accessibilityLabel = "Close Notification"
|
||||
|
||||
}
|
||||
|
||||
/// Resets to default settings.
|
||||
@ -298,17 +303,7 @@ open class Notification: View {
|
||||
super.layoutSubviews()
|
||||
layer.cornerRadius = UIScreen.main.bounds.width == bounds.width ? 0 : 4.0
|
||||
}
|
||||
|
||||
///Updating the accessiblity values i.e elements, label, value other items for the component.
|
||||
open override func updateAccessibility() {
|
||||
super.updateAccessibility()
|
||||
accessibilityElements = [closeButton, typeIcon, titleLabel, subTitleLabel, buttonGroup]
|
||||
typeIcon.accessibilityLabel = style.rawValue
|
||||
typeIcon.imageView.image?.isAccessibilityElement = false
|
||||
closeButton.accessibilityTraits = [.button]
|
||||
closeButton.accessibilityLabel = "Close Notification"
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Private Methods
|
||||
//--------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user