From 8fd1fa27947cf61ad3c2bb2cb3c4123c4f980a94 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 00:03:56 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20tooltip=20to=20?= =?UTF-8?q?clear=20search=20button=20in=20login=20onboarding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💡 What: Added `android:tooltipText="@string/clear"` to the `search_clear` ImageButton in `header_onboarding_login.xml`. 🎯 Why: Provides helpful descriptive text when users hover with a mouse or long-press the icon-only button on Android API 26+ devices. ♿ Accessibility: Improves accessibility parity by ensuring visual tooltip feedback matches screen reader content description. Co-authored-by: dlukt <201112286+dlukt@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ mastodon/src/main/res/layout/header_onboarding_login.xml | 1 + 2 files changed, 5 insertions(+) diff --git a/.Jules/palette.md b/.Jules/palette.md index 2a9583abb..68f234b31 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -39,3 +39,7 @@ ## 2024-05-24 - Missing Tooltips on API 26+ **Learning:** Many icon-only buttons (`ImageButton`, `ImageView`) throughout the app have `android:contentDescription` set but lack a corresponding `android:tooltipText`. This means screen readers will announce them, but users relying on mouse hover or long-press will not see a descriptive text box. **Action:** Always add `android:tooltipText` matching `android:contentDescription` on icon-only interactive elements in XML to ensure visual parity with screen reader text. + +## 2026-05-11 - Add tooltip to search clear button in onboarding login +**Learning:** The 'clear' button in `header_onboarding_login.xml` was missing `tooltipText`, which helps mouse/stylus users understand icon-only buttons on Android API 26+. +**Action:** Add `android:tooltipText` matching the `android:contentDescription` to all icon-only buttons. diff --git a/mastodon/src/main/res/layout/header_onboarding_login.xml b/mastodon/src/main/res/layout/header_onboarding_login.xml index dae499010..e9e000ee3 100644 --- a/mastodon/src/main/res/layout/header_onboarding_login.xml +++ b/mastodon/src/main/res/layout/header_onboarding_login.xml @@ -63,6 +63,7 @@ android:visibility="gone" tools:visibility="visible" android:contentDescription="@string/clear" + android:tooltipText="@string/clear" android:stateListAnimator="@null" android:elevation="0dp" android:tint="?colorM3OnSurfaceVariant"