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

Commit 1055d17c authored by Riley Jones's avatar Riley Jones Committed by Android (Google) Code Review
Browse files

Merge "Fix for accessibility focus in custom snackbar" into main

parents 163fd0c6 28912453
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -118,6 +118,12 @@ class DragToInteractView(context: Context) : FrameLayout(context) {
                iconResId = R.drawable.pip_ic_close_white
            )
        )

        // Ensure this is unfocusable & uninteractable
        isClickable = false
        isFocusable = false
        importantForAccessibility = IMPORTANT_FOR_ACCESSIBILITY_NO

        // END DragToInteractView modification
    }

+6 −0
Original line number Diff line number Diff line
@@ -74,6 +74,12 @@ class MenuMessageView extends LinearLayout implements
        addView(mTextView, Index.TEXT_VIEW,
                new LayoutParams(/* width= */ 0, WRAP_CONTENT, /* weight= */ 1));
        addView(mUndoButton, Index.UNDO_BUTTON, new LayoutParams(WRAP_CONTENT, WRAP_CONTENT));

        // The message box is not focusable, but will announce its contents when it appears.
        // The textView and button are still interactable.
        setClickable(false);
        setFocusable(false);
        setAccessibilityLiveRegion(ACCESSIBILITY_LIVE_REGION_POLITE);
    }

    @Override
+4 −0
Original line number Diff line number Diff line
@@ -101,6 +101,10 @@ class MenuView extends FrameLayout implements
        loadLayoutResources();

        addView(mTargetFeaturesView);

        setClickable(false);
        setFocusable(false);
        setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
    }

    @Override
+3 −0
Original line number Diff line number Diff line
@@ -319,6 +319,9 @@ class MenuViewLayer extends FrameLayout implements
        if (Flags.floatingMenuAnimatedTuck()) {
            setClipChildren(true);
        }
        setClickable(false);
        setFocusable(false);
        setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
    }

    @Override