From b6ed03adaec1b5d4969ad8cf602a5328d3d7e7ae Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 5 Oct 2023 15:36:25 -0500 Subject: [PATCH 1/5] ONEAPP-4684 - Acessibility - Tooltip Signed-off-by: Matt Bruce --- VDS/Components/Tooltip/Tooltip.swift | 1 - VDS/Components/Tooltip/TooltipAlertViewController.swift | 4 ++-- VDS/Components/Tooltip/TooltipDialog.swift | 2 +- VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Tooltip/Tooltip.swift b/VDS/Components/Tooltip/Tooltip.swift index 5b8390c8..c6ae86ba 100644 --- a/VDS/Components/Tooltip/Tooltip.swift +++ b/VDS/Components/Tooltip/Tooltip.swift @@ -180,7 +180,6 @@ open class Tooltip: Control, TooltipLaunchable { accessibilityLabel = "Modal" } accessibilityHint = isEnabled ? "Double tap to open." : "" - accessibilityValue = "collapsed" } public static func accessibleText(for title: String?, content: String?, closeButtonText: String) -> String { diff --git a/VDS/Components/Tooltip/TooltipAlertViewController.swift b/VDS/Components/Tooltip/TooltipAlertViewController.swift index 60300997..63645c0e 100644 --- a/VDS/Components/Tooltip/TooltipAlertViewController.swift +++ b/VDS/Components/Tooltip/TooltipAlertViewController.swift @@ -67,14 +67,14 @@ open class TooltipAlertViewController: UIViewController, Surfaceable { //left-right swipe view.publisher(for: UISwipeGestureRecognizer().with{ $0.direction = .right }) .sink { [weak self] swipe in - guard let self else { return } + guard let self, !UIAccessibility.isVoiceOverRunning else { return } self.dismiss() }.store(in: &subscribers) //tapping in background view.publisher(for: UITapGestureRecognizer().with{ $0.numberOfTapsRequired = 1 }) .sink { [weak self] swipe in - guard let self else { return } + guard let self, !UIAccessibility.isVoiceOverRunning else { return } self.dismiss() }.store(in: &subscribers) diff --git a/VDS/Components/Tooltip/TooltipDialog.swift b/VDS/Components/Tooltip/TooltipDialog.swift index a3db25c3..a5db8627 100644 --- a/VDS/Components/Tooltip/TooltipDialog.swift +++ b/VDS/Components/Tooltip/TooltipDialog.swift @@ -48,7 +48,6 @@ open class TooltipDialog: View, UIScrollViewDelegate { lazy var primaryAccessibilityElement = UIAccessibilityElement(accessibilityContainer: self).with { $0.accessibilityLabel = "Modal" - $0.accessibilityValue = "expanded" $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 label.isAccessibilityElement = true + label.accessibilityTraits = .header label.textStyle = .boldTitleMedium } diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 7531c46f..606a1d36 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.45 +======= +- ONEAPP-4684 - Acessibility - Tooltip + 1.0.44 ======= - ONEAPP-5109 - Typography/Label - Accessibility iOS From d2648489f03dd23df3f46571b6720ac8fdafaf8d Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 6 Oct 2023 15:31:40 -0500 Subject: [PATCH 2/5] updated version Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index d782bcfa..d65f62ae 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1175,7 +1175,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 44; + CURRENT_PROJECT_VERSION = 45; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1212,7 +1212,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 44; + CURRENT_PROJECT_VERSION = 45; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; From 913cffe24e9da5fa6896cbd79d2040127317c857 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Oct 2023 14:36:21 -0500 Subject: [PATCH 3/5] ONEAPP-4828 - [Accessibility] Toggle ONEAPP-4684 - [Accessibility] Tooltip Signed-off-by: Matt Bruce --- VDS/Components/Tooltip/Tooltip.swift | 19 +++++++++---------- VDS/Protocols/Clickable.swift | 3 ++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/VDS/Components/Tooltip/Tooltip.swift b/VDS/Components/Tooltip/Tooltip.swift index c6ae86ba..6e122950 100644 --- a/VDS/Components/Tooltip/Tooltip.swift +++ b/VDS/Components/Tooltip/Tooltip.swift @@ -130,16 +130,15 @@ open class Tooltip: Control, TooltipLaunchable { isAccessibilityElement = true accessibilityTraits = .button - onClickSubscriber = publisher(for: .touchUpInside) - .sink(receiveValue: { [weak self] tooltip in - guard let self else { return} - self.presentTooltip(surface: tooltip.surface, - tooltipModel: .init(closeButtonText: tooltip.closeButtonText, - title: tooltip.title, - content: tooltip.content, - contentView: tooltip.contentView), - presenter: self) - }) + onClick = { [weak self] tooltip in + guard let self else { return} + self.presentTooltip(surface: tooltip.surface, + tooltipModel: .init(closeButtonText: tooltip.closeButtonText, + title: tooltip.title, + content: tooltip.content, + contentView: tooltip.contentView), + presenter: self) + } } /// Resets to default settings. diff --git a/VDS/Protocols/Clickable.swift b/VDS/Protocols/Clickable.swift index b8c49a88..29b66aaf 100644 --- a/VDS/Protocols/Clickable.swift +++ b/VDS/Protocols/Clickable.swift @@ -22,7 +22,8 @@ extension Clickable { set { if let newValue { onClickSubscriber = publisher(for: .touchUpInside) - .sink { c in + .sink { [weak self] c in + guard let self, self.isEnabled else { return } newValue(c) } } else { From f95f9eb64b96e43275ad8e064078dff0575664c0 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Oct 2023 14:38:48 -0500 Subject: [PATCH 4/5] updated release notes Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 606a1d36..90973c50 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,8 @@ +1.0.46 +======= +- ONEAPP-4828 - Accessibility - Toggle +- ONEAPP-4684 - Accessibility - Tooltip + 1.0.45 ======= - ONEAPP-4684 - Acessibility - Tooltip From 71ef62ebbf13b1742392696dc2ef4a155b0c2120 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 10 Oct 2023 14:41:37 -0500 Subject: [PATCH 5/5] updated version Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index d65f62ae..88e57b9d 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1175,7 +1175,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1212,7 +1212,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1;