From 913a7da58c9cc524d1f15c848ff5a3306bcce6f1 Mon Sep 17 00:00:00 2001 From: Tony Mak Date: Mon, 19 Mar 2018 18:23:17 +0000 Subject: Accessibility improvement around blue user education card 1. Group the entire card into one element 2. Add label for close button 3. Announce closed when the card is gone FIXES: 74517054 Change-Id: I8fe41d4c5e88276460c3f0486168f0ef56d8fb60 --- src/com/android/launcher3/views/BottomUserEducationView.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/com/android/launcher3/views/BottomUserEducationView.java b/src/com/android/launcher3/views/BottomUserEducationView.java index ba78cf684..a291fc605 100644 --- a/src/com/android/launcher3/views/BottomUserEducationView.java +++ b/src/com/android/launcher3/views/BottomUserEducationView.java @@ -22,11 +22,15 @@ import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.TouchDelegate; import android.view.View; +import android.view.accessibility.AccessibilityEvent; + import com.android.launcher3.Insettable; import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.anim.Interpolators; +import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent; + public class BottomUserEducationView extends AbstractSlideInView implements Insettable { private static final String KEY_SHOWED_BOTTOM_USER_EDUCATION = "showed_bottom_user_education"; @@ -90,6 +94,10 @@ public class BottomUserEducationView extends AbstractSlideInView implements Inse // close action. mLauncher.getSharedPrefs().edit() .putBoolean(KEY_SHOWED_BOTTOM_USER_EDUCATION, true).apply(); + sendCustomAccessibilityEvent( + BottomUserEducationView.this, + AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED, + getContext().getString(R.string.bottom_work_tab_user_education_closed)); } } -- cgit v1.2.3