Skip to content

Commit

Permalink
a11y: Add more content descriptions to image only buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
pvagner committed Feb 8, 2024
1 parent d7605eb commit a0ad3de
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 8 deletions.
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_motivation_alert_texts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_add"
android:src="@drawable/ic_bell_plus_white_24dp"
app:layout_anchor="@id/motivation_text_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_training_overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_start_training"
android:src="@drawable/ic_plus_white_24dp"
app:layout_anchor="@id/training_overview_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_walking_modes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_margin="@dimen/fab_margin"
android:contentDescription="@string/a11y_add"
android:src="@drawable/ic_plus_white_24dp"
app:layout_anchor="@id/walking_modes_list"
app:layout_anchorGravity="bottom|right|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_activity_bar_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
android:layout_alignTop="@+id/period"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />

</RelativeLayout>
Expand All @@ -75,4 +76,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_activity_chart.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
android:layout_alignTop="@+id/period"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />

</RelativeLayout>
Expand All @@ -75,4 +76,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
4 changes: 3 additions & 1 deletion app/src/main/res/layout/card_activity_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
style="@style/SimpleImageButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:contentDescription="@string/a11y_prev"
android:src="@drawable/ic_chevron_left_black_24dp"/>

<RelativeLayout
Expand Down Expand Up @@ -79,6 +80,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:contentDescription="@string/a11y_next"
android:src="@drawable/ic_chevron_right_black_24dp" />
<ImageButton
android:id="@+id/periodMoreButton"
Expand Down Expand Up @@ -238,4 +240,4 @@
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/card_training_session.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/training_card_title"
android:layout_marginRight="16dp"
android:contentDescription="@string/a11y_options"
android:src="@drawable/ic_more_vert_black_24dp" />


Expand Down Expand Up @@ -377,4 +378,4 @@
</androidx.cardview.widget.CardView>


</LinearLayout>
</LinearLayout>
2 changes: 2 additions & 0 deletions app/src/main/res/layout/widget_2x1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/pause_step_detection"
android:src="@android:drawable/ic_media_pause" />

<ImageButton
android:id="@+id/continue_step_detection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/continue_step_detection"
android:src="@android:drawable/ic_media_play"
android:visibility="gone" />
</LinearLayout>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/widget_3x1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/pause_step_detection"
android:src="@android:drawable/ic_media_pause" />

<ImageButton
android:id="@+id/continue_step_detection"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/continue_step_detection"
android:src="@android:drawable/ic_media_play"
android:visibility="gone" />
</LinearLayout>
Expand All @@ -87,6 +89,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:contentDescription="@string/a11y_start_training"
android:src="@drawable/ic_plus_white_24dp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,8 @@
<string name="dialog_permission_activity_recognition">The Activity Recognition permission is needed to access step data.</string>
<string name="dialog_permission_activity_recognition_2">The permission was denied multiple times. You will need to enable the permission manually though the the device settings.</string>
<string name="a11y_options">Options</string>
<string name="a11y_add">Add</string>
<string name="a11y_prev">Previous</string>
<string name="a11y_next">Next</string>
<string name="a11y_start_training">Start training</string>
</resources>

0 comments on commit a0ad3de

Please sign in to comment.