diff --git a/VDS/Components/Notification/Notification.swift b/VDS/Components/Notification/Notification.swift index 7dd36b4c..7ed25962 100644 --- a/VDS/Components/Notification/Notification.swift +++ b/VDS/Components/Notification/Notification.swift @@ -39,18 +39,32 @@ open class Notification: View { public enum Style: String, CaseIterable { case info, success, warning, error - func iconName() -> Icon.Name { + var iconName: Icon.Name { switch self { case .info: - return .infoBold + .infoBold case .success: - return .checkmarkAltBold + .checkmarkAltBold case .warning: - return .warningBold + .warningBold case .error: - return .errorBold + .errorBold } } + + var accessibilityText: String { + switch self { + case .info: + "Information Message" + case .success: + "Success Message" + case .warning: + "Warning Message" + case .error: + "Catastrophic Warning Alert" + } + } + } //-------------------------------------------------- @@ -309,8 +323,9 @@ open class Notification: View { //-------------------------------------------------- private func updateIcons() { let iconColor = surface == .dark ? VDSColor.paletteWhite : VDSColor.paletteBlack - typeIcon.name = style.iconName() + typeIcon.name = style.iconName typeIcon.color = iconColor + typeIcon.accessibilityLabel = style.accessibilityText closeButton.color = iconColor closeButton.isHidden = hideCloseButton }