diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index 19b78e6f..12e5ee70 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -306,7 +306,10 @@ open class ButtonIcon: Control { /// Called once when a view is initialized and is used to Setup additional UI or other constants and configurations. open override func setup() { super.setup() - + isAccessibilityElement = true + accessibilityTraits = .image + accessibilityElements = [badgeIndicator] + //create a layoutGuide for the icon to key off of let iconLayoutGuide = UILayoutGuide() addLayoutGuide(iconLayoutGuide) @@ -473,8 +476,14 @@ open class ButtonIcon: Control { badgeIndicatorTrailingConstraint?.isActive = true } } + + /// Used to update any Accessibility properties. + open override func updateAccessibility() { + super.updateAccessibility() + setAccessibilityLabel(for: [icon, badgeIndicator.label]) + } } - + // MARK: AppleGuidelinesTouchable extension ButtonIcon: AppleGuidelinesTouchable { /// Overrides to ensure that the touch point meets a minimum of the minimumTappableArea.