Update the All apps label to "Apps list"
Set the AccessibilityNodeInfo containerTitle to improve a11y for users in predictionRow. See expected behavior suggestion in https://b.corp.google.com/issues/379640673#comment1 Video Quickstep launcher: http://recall/-/cOtJfHR6buEyEHnRyCqzVE/eugH3ID7eenOuLwTszaLHk Pixel launcher: http://recall/-/cOtJfHR6buEyEHnRyCqzVE/fftzwMRCy6N3o7OcwiGMdk Bug: 379640673 Test: Manual Flag: EXEMPT a11y bugfix Change-Id: I23a8a142afb213c0801402a56bc134bc14f0f97d
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
<com.android.launcher3.appprediction.PredictionRowView
|
||||
android:id="@+id/prediction_row"
|
||||
android:accessibilityPaneTitle="@string/title_app_suggestions"
|
||||
android:layout_width="match_parent"
|
||||
android:importantForAccessibility="yes"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.android.launcher3.appprediction.AppsDividerView
|
||||
|
||||
@@ -16,12 +16,16 @@
|
||||
|
||||
package com.android.launcher3.appprediction;
|
||||
|
||||
import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -90,6 +94,14 @@ public class PredictionRowView<T extends Context & ActivityContext>
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
|
||||
super.onInitializeAccessibilityNodeInfo(info);
|
||||
if (Build.VERSION.SDK_INT >= UPSIDE_DOWN_CAKE) {
|
||||
info.setContainerTitle(mActivityContext.getString(R.string.title_app_suggestions));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
|
||||
@@ -102,7 +102,7 @@ public class AllAppsState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public int getTitle() {
|
||||
return R.string.all_apps_label;
|
||||
return R.string.all_apps_list_label;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -190,6 +190,8 @@
|
||||
<!-- Label for the header text of the All Apps section in All Apps view, used to separate Predicted Apps and Actions section from All Apps section. [CHAR_LIMIT=50] -->
|
||||
<string name="all_apps_label">All apps</string>
|
||||
|
||||
<string name="all_apps_list_label">Apps list</string>
|
||||
|
||||
<!-- Popup items -->
|
||||
<!-- Text to display as the header above notifications. [CHAR_LIMIT=30] -->
|
||||
<string name="notifications_header">Notifications</string>
|
||||
|
||||
Reference in New Issue
Block a user