CXTDT-546824 - Notification Status / Close icon

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-04-29 12:39:25 -05:00
parent 07110ed5cc
commit f65cc2115b

View File

@ -264,8 +264,6 @@ open class Notification: View {
isAccessibilityElement = false
accessibilityElements = [closeButton, typeIcon, titleLabel, subTitleLabel, buttonGroup]
closeButton.accessibilityTraits = [.button]
closeButton.accessibilityLabel = "Close Notification"
}
/// Resets to default settings.
@ -325,7 +323,6 @@ open class Notification: View {
let iconColor = surface == .dark ? VDSColor.paletteWhite : VDSColor.paletteBlack
typeIcon.name = style.iconName
typeIcon.color = iconColor
typeIcon.accessibilityLabel = style.accessibilityText
closeButton.color = iconColor
closeButton.isHidden = hideCloseButton
}
@ -374,6 +371,12 @@ open class Notification: View {
}
}
open override func updateAccessibility() {
super.updateAccessibility()
closeButton.accessibilityLabel = "Close Notification"
typeIcon.accessibilityLabel = style.accessibilityText
}
private func setConstraints() {
labelViewAndButtonViewConstraint?.deactivate()
labelViewBottomConstraint?.deactivate()