diff options
author | 2025-01-22 17:48:24 +0000 | |
---|---|---|
committer | 2025-01-24 12:34:42 -0800 | |
commit | b1ae9e0d766d4e413387a30f671e726b27d27952 (patch) | |
tree | 584a5f34806c16b909d042bde93a05a21196c551 /packages/SystemUI | |
parent | 775c85481fcc2776cc25a02df304804367e4da47 (diff) |
Bouncer a11y - Make message area selectable
By default, focus should go to the input area for PIN views.
However, the user should still be able to navigate to the message
area text to prompt readout.
Fixes: 379016691
Test: manual - use talkback
Flag: EXEMPT a11y fix
Change-Id: I2c566148dd5c12be6222dfb85c43b447772a1ec9
Diffstat (limited to 'packages/SystemUI')
8 files changed, 12 insertions, 8 deletions
diff --git a/packages/SystemUI/res-keyguard/layout/bouncer_message_view.xml b/packages/SystemUI/res-keyguard/layout/bouncer_message_view.xml index f7dac13888c0..ea494b4642d5 100644 --- a/packages/SystemUI/res-keyguard/layout/bouncer_message_view.xml +++ b/packages/SystemUI/res-keyguard/layout/bouncer_message_view.xml @@ -21,7 +21,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/keyguard_lock_padding" - android:focusable="true" + android:focusable="false" /> <com.android.keyguard.BouncerKeyguardMessageArea @@ -30,6 +30,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/secondary_message_padding" - android:focusable="true" /> + android:focusable="false" /> </merge> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_password_motion_layout.xml b/packages/SystemUI/res-keyguard/layout/keyguard_password_motion_layout.xml index 2a8f1b596711..f231df2f1a10 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_password_motion_layout.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_password_motion_layout.xml @@ -66,7 +66,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml index 76f6f599c54c..04457229d573 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml @@ -31,7 +31,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_motion_layout.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_motion_layout.xml index 5879c110d8a1..b184344f2f24 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_motion_layout.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_motion_layout.xml @@ -67,7 +67,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml index 3f7b02835357..0e15ff66f3ee 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pattern_view.xml @@ -35,7 +35,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml index b464fb3bafed..f6ac02aee657 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_motion_layout.xml @@ -74,7 +74,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml index 21580731aed2..ba4da794d777 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml @@ -32,7 +32,7 @@ <com.android.systemui.bouncer.ui.BouncerMessageView android:id="@+id/bouncer_message_view" - android:importantForAccessibility="noHideDescendants" + android:screenReaderFocusable="true" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java index 7f176de547bc..0e9d8fec9717 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputViewController.java @@ -16,6 +16,8 @@ package com.android.keyguard; +import static android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED; + import static com.android.systemui.Flags.pinInputFieldStyledFocusState; import static com.android.systemui.util.kotlin.JavaAdapterKt.collectFlow; @@ -164,6 +166,8 @@ public abstract class KeyguardPinBasedInputViewController<T extends KeyguardPinB layoutParams.height = (int) getResources().getDimension( R.dimen.keyguard_pin_field_height); } + + mPasswordEntry.sendAccessibilityEvent(TYPE_VIEW_FOCUSED); } private void setKeyboardBasedFocusOutline(boolean isAnyKeyboardConnected) { |