Merge branch 'feature/ONEAPP-5868' into 'develop'
story: ONEAPP-5868 page control update ### Summary Adding identifiers for pageControl in Carousel and make it accessible to automation. ### JIRA Ticket https://onejira.verizon.com/browse/ONEAPP-5868 Co-authored-by: Nandhini Rajendran <nandhini.rajendran@verizon.com> Co-authored-by: Rajendran, Nandhini <nandhini.rajendran@one.verizon.com> See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1010
This commit is contained in:
commit
9c75add43f
@ -213,7 +213,9 @@ open class BarsIndicatorView: CarouselIndicator {
|
|||||||
let accessibleIndex = MVMCoreUIUtility.getOrdinalString(forIndex: NSNumber(value: index + 1))
|
let accessibleIndex = MVMCoreUIUtility.getOrdinalString(forIndex: NSNumber(value: index + 1))
|
||||||
else { return }
|
else { return }
|
||||||
|
|
||||||
view.accessibilityLabel = String(format: accessibleValueFormat, accessibleIndex, numberOfPages)
|
let accessibilityValue = String(format: accessibleValueFormat, accessibleIndex, numberOfPages)
|
||||||
|
view.accessibilityLabel = accessibilityValue
|
||||||
|
view.accessibilityIdentifier = accessibilityValue
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func assessTouchOf(_ touchPoint_X: CGFloat) {
|
public override func assessTouchOf(_ touchPoint_X: CGFloat) {
|
||||||
|
|||||||
@ -372,7 +372,9 @@ open class Carousel: View {
|
|||||||
self.carouselAccessibilityElement = carouselAccessibilityElement
|
self.carouselAccessibilityElement = carouselAccessibilityElement
|
||||||
}
|
}
|
||||||
|
|
||||||
if let currentCell = collectionView.cellForItem(at: IndexPath(row: currentIndex, section: 0)) {
|
if let currentCell = collectionView.cellForItem(at: IndexPath(row: currentIndex, section: 0)), let pagingView = self.pagingView {
|
||||||
|
_accessibilityElements = [currentCell, carouselAccessibilityElement, pagingView]
|
||||||
|
} else if let currentCell = collectionView.cellForItem(at: IndexPath(row: currentIndex, section: 0)) {
|
||||||
_accessibilityElements = [currentCell, carouselAccessibilityElement]
|
_accessibilityElements = [currentCell, carouselAccessibilityElement]
|
||||||
} else {
|
} else {
|
||||||
_accessibilityElements = [carouselAccessibilityElement]
|
_accessibilityElements = [carouselAccessibilityElement]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user