diff --git a/VDS/Components/Label/Label.swift b/VDS/Components/Label/Label.swift index 47bb0c28..f540e8e4 100644 --- a/VDS/Components/Label/Label.swift +++ b/VDS/Components/Label/Label.swift @@ -156,11 +156,11 @@ open class Label: UILabel, Handlerable, ViewProtocol, Resettable, UserInfoable { //add attribute on the string attribute.setAttribute(on: mutableAttributedString) - + //see if the attribute is Actionable if let actionable = attribute as? any ActionLabelAttributeModel{ //create a accessibleAction - let customAccessibilityAction = customAccessibilityAction(range: actionable.range, accessibleText: actionable.accessibleText) + let customAccessibilityAction = customAccessibilityAction(text: mutableAttributedString.string, range: actionable.range, accessibleText: actionable.accessibleText) //create a wrapper for the attributes range, block and actions.append(LabelAction(range: actionable.range, action: actionable.action, accessibilityID: customAccessibilityAction?.hashValue ?? -1)) @@ -263,7 +263,7 @@ open class Label: UILabel, Handlerable, ViewProtocol, Resettable, UserInfoable { //-------------------------------------------------- // MARK: - Accessibility For Actions //-------------------------------------------------- - private func customAccessibilityAction(range: NSRange, accessibleText: String? = nil) -> UIAccessibilityCustomAction? { + private func customAccessibilityAction(text: String?, range: NSRange, accessibleText: String? = nil) -> UIAccessibilityCustomAction? { guard let text = text else { return nil } //TODO: accessibilityHint for Label