From d1a320d44bce2c5fddc54c617b88276d076a5c83 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 28 Mar 2024 09:23:26 -0500 Subject: [PATCH] refactored out broken accessibility for notification Signed-off-by: Matt Bruce --- VDS/Components/Notification/Notification.swift | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index cc011249..7dd36b4c 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -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 //--------------------------------------------------