Adds content descriptions and hints to non-textual elements so they can be described by screen readers.
This commit is contained in:
parent
4ea04bb576
commit
f6a165a50a
12 changed files with 91 additions and 63 deletions
|
|
@ -36,7 +36,8 @@
|
|||
app:layout_collapseMode="pin"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_alignTop="@+id/account_header_info"
|
||||
android:layout_alignBottom="@id/account_header_info" />
|
||||
android:layout_alignBottom="@id/account_header_info"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
|
@ -101,7 +102,8 @@
|
|||
android:layout_toEndOf="@id/account_username"
|
||||
app:srcCompat="@drawable/reblog_disabled_light"
|
||||
android:tint="?android:textColorSecondary"
|
||||
android:layout_toRightOf="@id/account_username" />
|
||||
android:layout_toRightOf="@id/account_username"
|
||||
android:contentDescription="@string/description_account_locked"/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -181,6 +183,7 @@
|
|||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/ic_person_add_24dp"/>
|
||||
app:srcCompat="@drawable/ic_person_add_24dp"
|
||||
android:contentDescription="@string/action_follow" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/activity_compose"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -96,7 +97,8 @@
|
|||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp" />
|
||||
app:srcCompat="@drawable/ic_attach_file_24dp"
|
||||
android:contentDescription="@string/action_photo_pick" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/action_toggle_visibility"
|
||||
|
|
@ -104,7 +106,8 @@
|
|||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginRight="8dp"
|
||||
app:srcCompat="@drawable/ic_public_24dp" />
|
||||
app:srcCompat="@drawable/ic_public_24dp"
|
||||
android:contentDescription="@string/action_compose_options" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/action_toggle_nsfw"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="50dp"
|
||||
android:src="@drawable/elephant_friend"/>
|
||||
android:src="@drawable/elephant_friend"
|
||||
android:contentDescription="@string/description_elephant_friend" />
|
||||
|
||||
<android.support.design.widget.TextInputLayout
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -36,7 +37,6 @@
|
|||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:elevation="0dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/action_login" />
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/activity_main"
|
||||
|
|
@ -80,7 +81,6 @@
|
|||
android:background="@drawable/material_drawer_shadow_bottom"
|
||||
android:visibility="visible" />
|
||||
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/floating_btn"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -89,10 +89,13 @@
|
|||
android:clickable="true"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:srcCompat="@drawable/ic_create_24dp"/>
|
||||
app:srcCompat="@drawable/ic_create_24dp"
|
||||
android:contentDescription="@string/action_compose" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/overlay_fragment_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"></FrameLayout>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</FrameLayout>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
style="?attr/image_button_style"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_centerVertical="true" />
|
||||
android:layout_centerVertical="true"
|
||||
android:contentDescription="@string/action_unblock" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@
|
|||
app:srcCompat="@drawable/ic_person_add_24dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:tint="?attr/colorAccent" />
|
||||
android:tint="?attr/colorAccent"
|
||||
android:contentDescription="@string/action_follow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notification_text"
|
||||
|
|
@ -50,7 +51,8 @@
|
|||
android:scaleType="fitCenter"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_alignParentLeft="true" />
|
||||
android:layout_alignParentLeft="true"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
android:id="@+id/status_reblogged_icon"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="24dp"
|
||||
android:tint="?android:textColorTertiary" />
|
||||
android:tint="?android:textColorTertiary"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
@ -41,7 +42,8 @@
|
|||
android:id="@+id/status_avatar"
|
||||
android:layout_below="@+id/status_reblogged_bar"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginRight="10dp" />
|
||||
android:layout_marginRight="10dp"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -58,7 +60,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="20m ago"
|
||||
android:text="20m"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -147,6 +149,7 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -160,7 +163,8 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_marginRight="2dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin" />
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_media_preview_1"
|
||||
|
|
@ -169,7 +173,9 @@
|
|||
android:layout_weight="1"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin" />
|
||||
android:layout_marginTop="@dimen/status_media_preview_top_margin"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -184,7 +190,8 @@
|
|||
android:layout_height="@dimen/status_media_preview_height"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginRight="2dp"
|
||||
android:scaleType="centerCrop" />
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status_media_preview_3"
|
||||
|
|
@ -192,9 +199,11 @@
|
|||
android:layout_height="@dimen/status_media_preview_height"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="centerCrop" />
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
@ -241,7 +250,8 @@
|
|||
android:id="@+id/status_reply"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
style="?attr/image_button_style" />
|
||||
style="?attr/image_button_style"
|
||||
android:contentDescription="@string/action_reply" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -257,7 +267,8 @@
|
|||
app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp" />
|
||||
android:layout_height="32dp"
|
||||
android:contentDescription="@string/action_reblog" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -273,7 +284,8 @@
|
|||
android:layout_gravity="center"
|
||||
app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark"
|
||||
app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light"
|
||||
android:id="@+id/status_favourite" />
|
||||
android:id="@+id/status_favourite"
|
||||
android:contentDescription="@string/action_favourite" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
@ -285,7 +297,8 @@
|
|||
android:id="@+id/status_more"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
style="?attr/image_button_style" />
|
||||
style="?attr/image_button_style"
|
||||
android:contentDescription="@string/action_more" />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
android:id="@+id/notification_icon"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingLeft="24dp"
|
||||
app:srcCompat="@drawable/ic_repeat_24dp" />
|
||||
app:srcCompat="@drawable/ic_repeat_24dp"
|
||||
android:contentDescription="@null" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
|||
|
|
@ -1,30 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
|
||||
<RelativeLayout
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true">
|
||||
android:id="@+id/title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/title"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/total"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@id/title"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/total"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@id/title"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</RelativeLayout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue