From 6b5b717d2e7fd68603d6765f28915a380a79b675 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 2 May 2026 00:01:13 +0000 Subject: [PATCH] UX: Add tooltipText to icon-only buttons for better accessibility Added `android:tooltipText` matching the `android:contentDescription` for several icon-only buttons (`ImageButton`, `ImageView`) in the UI to provide hover and long-press feedback for mouse, stylus, and touch users. Modified files: - `compose_poll_option.xml`: Delete and Reorder buttons. - `compose_fab.xml`: Main compose FAB. - `fragment_timeline.xml`: Timeline FAB. Co-authored-by: dlukt <201112286+dlukt@users.noreply.github.com> --- mastodon/src/main/res/layout/compose_fab.xml | 1 + mastodon/src/main/res/layout/compose_poll_option.xml | 2 ++ mastodon/src/main/res/layout/fragment_timeline.xml | 1 + 3 files changed, 4 insertions(+) diff --git a/mastodon/src/main/res/layout/compose_fab.xml b/mastodon/src/main/res/layout/compose_fab.xml index 84f55f281..a5989ee05 100644 --- a/mastodon/src/main/res/layout/compose_fab.xml +++ b/mastodon/src/main/res/layout/compose_fab.xml @@ -12,4 +12,5 @@ android:scaleType="center" android:stateListAnimator="@animator/fab_shadow" android:contentDescription="@string/new_post" + android:tooltipText="@string/new_post" android:src="@drawable/ic_fluent_compose_24_filled" /> diff --git a/mastodon/src/main/res/layout/compose_poll_option.xml b/mastodon/src/main/res/layout/compose_poll_option.xml index 64585eca9..d58c73957 100644 --- a/mastodon/src/main/res/layout/compose_poll_option.xml +++ b/mastodon/src/main/res/layout/compose_poll_option.xml @@ -32,6 +32,7 @@ android:src="@drawable/ic_fluent_delete_24_regular" android:background="?android:selectableItemBackground" android:contentDescription="@string/delete_poll_option" + android:tooltipText="@string/delete_poll_option" android:tint="?colorM3OnSurfaceVariant" android:scaleType="center" /> @@ -44,6 +45,7 @@ android:scaleType="center" android:tint="?colorM3OnSurfaceVariant" android:contentDescription="@string/reorder" + android:tooltipText="@string/reorder" android:paddingStart="4dp" android:src="@drawable/ic_fluent_re_order_dots_vertical_20_filled" tools:ignore="RtlSymmetry" /> diff --git a/mastodon/src/main/res/layout/fragment_timeline.xml b/mastodon/src/main/res/layout/fragment_timeline.xml index 32b2fb594..54a184421 100644 --- a/mastodon/src/main/res/layout/fragment_timeline.xml +++ b/mastodon/src/main/res/layout/fragment_timeline.xml @@ -32,6 +32,7 @@ android:scaleType="center" android:stateListAnimator="@animator/fab_shadow" android:contentDescription="@string/new_post" + android:tooltipText="@string/new_post" android:src="@drawable/ic_fluent_compose_24_filled"/>