ONEAPP-4684 - Acessibility - Tooltip
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
6ce86b5ac1
commit
b6ed03adae
@ -180,7 +180,6 @@ open class Tooltip: Control, TooltipLaunchable {
|
|||||||
accessibilityLabel = "Modal"
|
accessibilityLabel = "Modal"
|
||||||
}
|
}
|
||||||
accessibilityHint = isEnabled ? "Double tap to open." : ""
|
accessibilityHint = isEnabled ? "Double tap to open." : ""
|
||||||
accessibilityValue = "collapsed"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func accessibleText(for title: String?, content: String?, closeButtonText: String) -> String {
|
public static func accessibleText(for title: String?, content: String?, closeButtonText: String) -> String {
|
||||||
|
|||||||
@ -67,14 +67,14 @@ open class TooltipAlertViewController: UIViewController, Surfaceable {
|
|||||||
//left-right swipe
|
//left-right swipe
|
||||||
view.publisher(for: UISwipeGestureRecognizer().with{ $0.direction = .right })
|
view.publisher(for: UISwipeGestureRecognizer().with{ $0.direction = .right })
|
||||||
.sink { [weak self] swipe in
|
.sink { [weak self] swipe in
|
||||||
guard let self else { return }
|
guard let self, !UIAccessibility.isVoiceOverRunning else { return }
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
//tapping in background
|
//tapping in background
|
||||||
view.publisher(for: UITapGestureRecognizer().with{ $0.numberOfTapsRequired = 1 })
|
view.publisher(for: UITapGestureRecognizer().with{ $0.numberOfTapsRequired = 1 })
|
||||||
.sink { [weak self] swipe in
|
.sink { [weak self] swipe in
|
||||||
guard let self else { return }
|
guard let self, !UIAccessibility.isVoiceOverRunning else { return }
|
||||||
self.dismiss()
|
self.dismiss()
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
|||||||
|
|
||||||
lazy var primaryAccessibilityElement = UIAccessibilityElement(accessibilityContainer: self).with {
|
lazy var primaryAccessibilityElement = UIAccessibilityElement(accessibilityContainer: self).with {
|
||||||
$0.accessibilityLabel = "Modal"
|
$0.accessibilityLabel = "Modal"
|
||||||
$0.accessibilityValue = "expanded"
|
|
||||||
$0.accessibilityFrameInContainerSpace = .init(origin: .zero, size: .init(width: fullWidth, height: VDSLayout.Spacing.space1X.value))
|
$0.accessibilityFrameInContainerSpace = .init(origin: .zero, size: .init(width: fullWidth, height: VDSLayout.Spacing.space1X.value))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +58,7 @@ open class TooltipDialog: View, UIScrollViewDelegate {
|
|||||||
|
|
||||||
open var titleLabel = Label().with { label in
|
open var titleLabel = Label().with { label in
|
||||||
label.isAccessibilityElement = true
|
label.isAccessibilityElement = true
|
||||||
|
label.accessibilityTraits = .header
|
||||||
label.textStyle = .boldTitleMedium
|
label.textStyle = .boldTitleMedium
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
1.0.45
|
||||||
|
=======
|
||||||
|
- ONEAPP-4684 - Acessibility - Tooltip
|
||||||
|
|
||||||
1.0.44
|
1.0.44
|
||||||
=======
|
=======
|
||||||
- ONEAPP-5109 - Typography/Label - Accessibility iOS
|
- ONEAPP-5109 - Typography/Label - Accessibility iOS
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user