commit | ade5e8dc5becc6f309835edd52aeb39e5c2e3218 | [log] [tgz] |
---|---|---|
author | abdullahirum <abdullahirum@google.com> | Fri May 17 01:08:22 2024 +0000 |
committer | abdullahirum <abdullahirum@google.com> | Fri May 24 16:11:52 2024 +0000 |
tree | d9888dade0bb9f390c7774d6ef37cac4c1ebd49d | |
parent | a00436e8ceaed61ad78ba68052364447c8cbf72e [diff] |
Add post content description for preview This CL adds a content description to the lock screen preview in the home screen Flag: NONE Bug: 322445382 Test: manual Change-Id: Icd55fe65c4afe84eb2bee4ae6ca1c1098a07fad0
diff --git a/src/com/android/customization/picker/clock/ui/binder/CarouselAccessibilityDelegate.kt b/src/com/android/customization/picker/clock/ui/binder/CarouselAccessibilityDelegate.kt index 1026f19..5d6c3ff 100644 --- a/src/com/android/customization/picker/clock/ui/binder/CarouselAccessibilityDelegate.kt +++ b/src/com/android/customization/picker/clock/ui/binder/CarouselAccessibilityDelegate.kt
@@ -37,6 +37,11 @@ override fun onInitializeAccessibilityNodeInfo(host: View, info: AccessibilityNodeInfo) { super.onInitializeAccessibilityNodeInfo(host, info) info.isScrollable = true + + // for some reason this action is needed for the subsequent two action to appear in the + // accessibility action menu (this action doesn't show) + info.addAction(AccessibilityNodeInfo.ACTION_CLICK) // Standard click action + info.addAction( AccessibilityNodeInfo.AccessibilityAction( ACTION_SCROLL_FORWARD,
diff --git a/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt b/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt index e2616c7..7fcfd9c 100644 --- a/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt +++ b/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt
@@ -71,7 +71,7 @@ }, isTwoPaneAndSmallWidth = isTwoPaneAndSmallWidth, ) - screenPreviewClickView.accessibilityDelegate = carouselAccessibilityDelegate + carouselView.accessibilityDelegate = carouselAccessibilityDelegate screenPreviewClickView.setOnSideClickedListener { isStart -> if (isStart) carouselView.scrollToPrevious() else carouselView.scrollToNext()