From 8c7d9315593373862faeaf814d7120a3e3afec85 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 23:58:55 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Improve=20accessibili?= =?UTF-8?q?ty=20of=20M3Switch=20views?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `android:importantForAccessibility="no"` to custom `M3Switch` views where the parent layout is already handling click interactions and accessibility semantics (e.g. `edit_timeline.xml`, `list_timeline_editor.xml`, `fragment_report_comment.xml`). This prevents screen readers from redundantly announcing the state of the switch or complaining about missing content descriptions. Co-authored-by: dlukt <201112286+dlukt@users.noreply.github.com> --- mastodon/src/main/res/layout/edit_timeline.xml | 3 ++- mastodon/src/main/res/layout/fragment_report_comment.xml | 3 ++- mastodon/src/main/res/layout/list_timeline_editor.xml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mastodon/src/main/res/layout/edit_timeline.xml b/mastodon/src/main/res/layout/edit_timeline.xml index 95f23ba81..97a1d23a1 100644 --- a/mastodon/src/main/res/layout/edit_timeline.xml +++ b/mastodon/src/main/res/layout/edit_timeline.xml @@ -196,7 +196,8 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:focusable="false" - android:clickable="false"/> + android:clickable="false" + android:importantForAccessibility="no"/> diff --git a/mastodon/src/main/res/layout/fragment_report_comment.xml b/mastodon/src/main/res/layout/fragment_report_comment.xml index 0bb44cc07..b95cd27d0 100644 --- a/mastodon/src/main/res/layout/fragment_report_comment.xml +++ b/mastodon/src/main/res/layout/fragment_report_comment.xml @@ -66,7 +66,8 @@ android:layout_alignParentEnd="true" android:layout_alignParentTop="true" android:layout_marginStart="16dp" - android:checked="true"/> + android:checked="true" + android:importantForAccessibility="no"/> + android:clickable="false" + android:importantForAccessibility="no"/>