Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@
## 2024-05-29 - Semantic Role for Clickable Layouts
**Learning:** Clickable `LinearLayout`s (like poll duration/style selectors) are often announced as generic groups by screen readers, hiding their interactive nature. Setting an `AccessibilityDelegate` to define the class name as `android.widget.Button` effectively communicates that the element is actionable.
**Action:** Always verify that custom clickable containers expose a specific role (Button, Spinner, etc.) via `AccessibilityDelegate` or `ViewCompat` to ensure users know they can interact with them.
## 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.
3 changes: 2 additions & 1 deletion mastodon/src/main/res/layout/alert_invite_link.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
android:layout_gravity="end|top"
android:src="@drawable/ic_m3_cancel"
android:background="?android:actionBarItemBackground"
android:contentDescription="@string/clear"/>
android:contentDescription="@string/clear"
android:tooltipText="@string/clear"/>
</FrameLayout>

</LinearLayout>
2 changes: 2 additions & 0 deletions mastodon/src/main/res/layout/fragment_onboarding_common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
android:background="?android:selectableItemBackgroundBorderless"
android:tint="?colorM3OnSurface"
android:contentDescription="@string/back"
android:tooltipText="@string/back"
android:src="@drawable/ic_arrow_back"/>

<ImageButton
Expand All @@ -70,6 +71,7 @@
android:layout_alignTop="@id/search_edit"
android:layout_margin="12dp"
android:contentDescription="@string/clear"
android:tooltipText="@string/clear"
android:tint="?colorM3OnSurfaceVariant"
android:visibility="gone"
android:src="@drawable/ic_fluent_dismiss_20_filled"/>
Expand Down
2 changes: 2 additions & 0 deletions mastodon/src/main/res/layout/onboarding_profile_field.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:scaleType="center"
android:tint="?colorM3OnSurface"
android:contentDescription="@string/reorder"
android:tooltipText="@string/reorder"
android:src="@drawable/ic_fluent_re_order_dots_vertical_24_regular"/>

<ImageButton
Expand All @@ -30,6 +31,7 @@
android:tint="?colorM3OnSurface"
android:background="?android:actionBarItemBackground"
android:contentDescription="@string/delete"
android:tooltipText="@string/delete"
android:src="@drawable/ic_fluent_delete_24_regular"/>

<EditText
Expand Down
Loading