helper for text

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2023-07-31 13:42:37 -05:00
parent 1bed04dae0
commit 2c7666c214

View File

@ -183,6 +183,20 @@ open class Tooltip: Control, TooltipLaunchable {
accessibilityLabel = label
}
}
public static func accessibleText(for title: String?, content: String?, closeButtonText: String) -> String {
var label = ""
if let title {
label = title
}
if let content {
if !label.isEmpty {
label += ","
}
label += content
}
return label
}
}