From f65cc2115ba57cf9c83147f082b911de9c6f8639 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 29 Apr 2024 12:39:25 -0500 Subject: [PATCH] CXTDT-546824 - Notification Status / Close icon Signed-off-by: Matt Bruce --- VDS/Components/Notification/Notification.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index f91d45ef..241efb34 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -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()