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

Commit 6c67075b authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "A11Y - User switcher - Don't focus on Cancel button" into main

parents 2dc1d97c 1c6650cb
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
    android:id="@+id/user_switcher_root"
    android:id="@+id/user_switcher_root"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_height="match_parent"
    android:visibility="invisible"
    android:orientation="vertical">
    android:orientation="vertical">


  <ScrollView
  <ScrollView
@@ -72,7 +73,6 @@
        android:paddingHorizontal="@dimen/user_switcher_fullscreen_button_padding"
        android:paddingHorizontal="@dimen/user_switcher_fullscreen_button_padding"
        android:textSize="@dimen/user_switcher_fullscreen_button_text_size"
        android:textSize="@dimen/user_switcher_fullscreen_button_text_size"
        android:textColor="?androidprv:attr/colorAccentPrimary"
        android:textColor="?androidprv:attr/colorAccentPrimary"
        android:visibility="gone"
        android:text="@string/cancel" />
        android:text="@string/cancel" />


    <TextView
    <TextView
@@ -87,7 +87,6 @@
        android:paddingHorizontal="@dimen/user_switcher_fullscreen_button_padding"
        android:paddingHorizontal="@dimen/user_switcher_fullscreen_button_padding"
        android:textSize="@dimen/user_switcher_fullscreen_button_text_size"
        android:textSize="@dimen/user_switcher_fullscreen_button_text_size"
        android:textColor="?androidprv:attr/colorAccentPrimary"
        android:textColor="?androidprv:attr/colorAccentPrimary"
        android:visibility="gone"
        android:text="@string/cancel" />
        android:text="@string/cancel" />


    <Space
    <Space
+5 −2
Original line number Original line Diff line number Diff line
@@ -95,8 +95,6 @@ object UserSwitcherViewBinder {


            lifecycleScope.launch {
            lifecycleScope.launch {
                repeatOnLifecycle(Lifecycle.State.STARTED) {
                repeatOnLifecycle(Lifecycle.State.STARTED) {
                    cancelButton.isVisible = true

                    launch { viewModel.isOpenMenuButtonVisible.collect { addButton.isVisible = it } }
                    launch { viewModel.isOpenMenuButtonVisible.collect { addButton.isVisible = it } }


                    launch {
                    launch {
@@ -165,6 +163,11 @@ object UserSwitcherViewBinder {
                                    viewModel = userViewModel,
                                    viewModel = userViewModel,
                                )
                                )
                            }
                            }

                            // Mark the whole view as visible only after loading users, to prevent
                            // a11y services from announcing other elements too early, such as the
                            // "Cancel" button
                            view.visibility = View.VISIBLE
                        }
                        }
                    }
                    }
                }
                }