From 104398990bbd1574b96e1559305e35c760592370 Mon Sep 17 00:00:00 2001 From: David Hidalgo Fadrique Date: Thu, 11 Apr 2024 12:03:22 +0200 Subject: [PATCH] feat(Accessibility): IOS-9794 VIVO Novo app accessibility: Bottom sheet formats (#356) * Added accessibility label to ActionListItem Added AccessibilityElementType enum * Set AccessibilityElementType as public * Deleted AccessibilityElementType (no longer used, used UIAccessibilityTraits instead) Renamed itemAccessibilityLabel to accessibilityLabel Set accessibilityTraits = .link for ActionRow's Set accessibilityTraits = .button for backgroundDimmingView in BottomSheetPresentationController * Deleted accessibilityLabel from ActionRow. No longer needed due to the accessibility uses the title and the type is added with the accessibilityTraits --- .../BottomSheetPresentationController.swift | 1 + .../Components/Sheet/View/Fragments/List/Rows/ActionRow.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/Mistica/Components/Sheet/View/BottomSheetPresentation/BottomSheetPresentationController.swift b/Sources/Mistica/Components/Sheet/View/BottomSheetPresentation/BottomSheetPresentationController.swift index f666a0df..8979660a 100644 --- a/Sources/Mistica/Components/Sheet/View/BottomSheetPresentation/BottomSheetPresentationController.swift +++ b/Sources/Mistica/Components/Sheet/View/BottomSheetPresentation/BottomSheetPresentationController.swift @@ -26,6 +26,7 @@ final class BottomSheetPresentationController: UIPresentationController { view.isAccessibilityElement = true view.accessibilityLabel = backgroundViewAccessibilityLabel + view.accessibilityTraits = .button view.accessibilityEscape = { [weak self] in self?.presentedViewController.dismiss(animated: true) } diff --git a/Sources/Mistica/Components/Sheet/View/Fragments/List/Rows/ActionRow.swift b/Sources/Mistica/Components/Sheet/View/Fragments/List/Rows/ActionRow.swift index 7d4c0616..e4e92c85 100644 --- a/Sources/Mistica/Components/Sheet/View/Fragments/List/Rows/ActionRow.swift +++ b/Sources/Mistica/Components/Sheet/View/Fragments/List/Rows/ActionRow.swift @@ -46,6 +46,7 @@ private extension ActionRow { layoutViews() titleLabel.text = item.title + titleLabel.accessibilityTraits = .link let imageTintColor: UIColor