From be31eb37bbeabf437e109141367a09d5c660d4f2 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Mon, 4 May 2020 08:55:10 -0400 Subject: [PATCH] changes made for ticket --- .../CarouselIndicator/CarouselIndicator.swift | 8 +++++--- .../CarouselIndicator/NumericIndicatorView.swift | 14 +++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index e5c3e448..bc33b200 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -192,9 +192,7 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { currentIndex = model.currentIndex isEnabled = model.enabled - if let accessibleValue = MVMCoreUIUtility.hardcodedString(withKey: model.accessibilityHasSlidesInsteadOfPage ? "MVMCoreUIPageControlslides_currentpage_index" : "MVMCoreUIPageControl_currentpage_index") { - accessibilityValue = String(format: accessibleValue, currentIndex + 1, numberOfPages) - } + } //-------------------------------------------------- @@ -213,6 +211,10 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { func accessibilityAdjust(toPage index: Int) { + if let accessibleValue = MVMCoreUIUtility.hardcodedString(withKey: (carouselIndicatorModel?.accessibilityHasSlidesInsteadOfPage ?? false) ? "MVMCoreUIPageControlslides_currentpage_index" : "MVMCoreUIPageControl_currentpage_index") { + accessibilityValue = String(format: accessibleValue, currentIndex + 1, numberOfPages) + } + if (index < numberOfPages && index >= 0) || carouselIndicatorModel?.alwaysSendAction ?? false { carouselIndicatorModel?.animated = false previousIndex = currentIndex diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift index def7a7e4..2a09842d 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift @@ -125,11 +125,11 @@ open class NumericIndicatorView: CarouselIndicator { layoutIfNeeded() } - open override func accessibilityIncrement() { - incrementCurrentIndex() - } - - open override func accessibilityDecrement() { - decrementCurrentIndex() - } +// open override func accessibilityIncrement() { +// incrementCurrentIndex() +// } +// +// open override func accessibilityDecrement() { +// decrementCurrentIndex() +// } }