Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0b08a8f authored by Grace Cheng's avatar Grace Cheng
Browse files

Mark title & subtitle focusable, set selected unless a11y active

Marking title and subtitle important for accessibility to meet a11y
requirements. Title and subtitle are also set as selected to enable marquee, unless talkback is on, to avoid announcing "selected" (b/210363098 for context)

Test: Manually verified title & subtitle are focusable, not preceded by “Selected” in talkback
Fixes: 289000676
Change-Id: Ie070229e3798e9a3f91130cf83507b9efbfce6c0
parent 0c509a16
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
        android:singleLine="true"
        android:marqueeRepeatLimit="1"
        android:ellipsize="marquee"
        android:importantForAccessibility="no"
        style="@style/TextAppearance.AuthCredential.Title"/>

    <TextView
@@ -39,7 +38,6 @@
        android:singleLine="true"
        android:marqueeRepeatLimit="1"
        android:ellipsize="marquee"
        android:importantForAccessibility="no"
        style="@style/TextAppearance.AuthCredential.Subtitle"/>

    <TextView
+5 −3
Original line number Diff line number Diff line
@@ -92,9 +92,11 @@ object BiometricViewBinder {
        val subtitleView = view.findViewById<TextView>(R.id.subtitle)
        val descriptionView = view.findViewById<TextView>(R.id.description)

        // set selected for marquee
        titleView.isSelected = true
        subtitleView.isSelected = true
        // set selected to enable marquee unless a screen reader is enabled
        titleView.isSelected =
            !accessibilityManager.isEnabled || !accessibilityManager.isTouchExplorationEnabled
        subtitleView.isSelected =
            !accessibilityManager.isEnabled || !accessibilityManager.isTouchExplorationEnabled
        descriptionView.movementMethod = ScrollingMovementMethod()

        val iconViewOverlay = view.findViewById<LottieAnimationView>(R.id.biometric_icon_overlay)