[DocsUI M3] Fix talkback issue on the breadcrumb

Previously we put clickable/focusable directly on the TextView
inside the breadcrumb, which doesn't work well with the special
handling (AccessibilityEventRouter) of a11y inside breadcrumb,
which causes double tapping can't activate the breadcrumb item.
This CL moves the clickable/focusable back to the breadcrumb item
container and use duplicateParentState=true on the TextView to
get the expected state on the TextView.

Check the attached bug for the demo.

Bug: 415695308
Test: m DocumentsUIGoogle && manual inspection
Flag: com.android.documentsui.flags.use_material3
Change-Id: I3d9349fef193e86ca15ba32be0b6ed39963e460f
diff --git "a/res/flag\050com.android.documentsui.flags.use_material3\051/drawable/breadcrumb_item_background_m3.xml" "b/res/flag\050com.android.documentsui.flags.use_material3\051/drawable/breadcrumb_item_background_m3.xml"
index 689f32c..074e752 100644
--- "a/res/flag\050com.android.documentsui.flags.use_material3\051/drawable/breadcrumb_item_background_m3.xml"
+++ "b/res/flag\050com.android.documentsui.flags.use_material3\051/drawable/breadcrumb_item_background_m3.xml"
@@ -16,7 +16,6 @@
 
 <ripple
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:color="@color/breadcrumb_item_ripple_color">
     <item
         android:id="@android:id/mask"
@@ -24,6 +23,9 @@
 
     <item>
         <selector>
+            <item android:state_enabled="false">
+                <color android:color="@android:color/transparent"/>
+            </item>
             <item android:state_pressed="true">
                 <shape android:tint="?attr/colorOnSurfaceVariant">
                     <corners android:radius="@dimen/breadcrumb_item_height_m3" />
diff --git "a/res/flag\050com.android.documentsui.flags.use_material3\051/layout/navigation_breadcrumb_item_m3.xml" "b/res/flag\050com.android.documentsui.flags.use_material3\051/layout/navigation_breadcrumb_item_m3.xml"
index 02f8a0a..898aff3 100644
--- "a/res/flag\050com.android.documentsui.flags.use_material3\051/layout/navigation_breadcrumb_item_m3.xml"
+++ "b/res/flag\050com.android.documentsui.flags.use_material3\051/layout/navigation_breadcrumb_item_m3.xml"
@@ -21,14 +21,23 @@
     android:layout_height="wrap_content"
     android:minHeight="@dimen/breadcrumb_height"
     android:gravity="center_vertical"
+    android:focusable="true"
+    android:clickable="true"
+    android:defaultFocusHighlightEnabled="false"
     android:orientation="horizontal">
 
+    <!-- We can't put clickable/focusable on the TextView below even though we only want the
+         highlight/focus ring on the TextView instead of the whole item, this is because there is a
+         specific logic in HorizontalBreadcrumb when binding click event, the event is bound
+         on the whole item directly and there are special a11y handling (check the
+         `setAccessibilityDelegateCompat` call). Given we don't want the focus background on
+         the item, we also need defaultFocusHighlightEnabled above and duplicateParentState
+         below.  -->
     <com.google.android.material.textview.MaterialTextView
         android:id="@+id/breadcrumb_text"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:focusable="true"
-        android:clickable="true"
+        android:duplicateParentState="true"
         android:maxWidth="275dp"
         android:gravity="center_vertical"
         android:maxLines="1"
diff --git a/src/com/android/documentsui/HorizontalBreadcrumb.java b/src/com/android/documentsui/HorizontalBreadcrumb.java
index 92d2d1e..4b645b9 100644
--- a/src/com/android/documentsui/HorizontalBreadcrumb.java
+++ b/src/com/android/documentsui/HorizontalBreadcrumb.java
@@ -203,7 +203,7 @@
                     isFirst ? mEnv.getCurrentRoot().title : mState.stack.get(position).displayName);
             if (isUseMaterial3FlagEnabled()) {
                 // The last path part in the breadcrumb is not clickable.
-                holder.mTitle.setEnabled(!isLast);
+                holder.itemView.setEnabled(!isLast);
             } else {
                 holder.mTitle.setEnabled(isLast);
             }