Fix some lint issue about accessibility

This commit is contained in:
Benoit Marty 2021-02-12 15:04:03 +01:00
parent ebd55ea282
commit 9e86b35f8c
23 changed files with 40 additions and 6 deletions

View file

@ -61,7 +61,7 @@ class ExportKeysDialog {
passwordVisible = !passwordVisible
views.exportDialogEt.showPassword(passwordVisible)
views.exportDialogEtConfirm.showPassword(passwordVisible)
views.exportDialogShowPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye)
views.exportDialogShowPassword.setImageResource(if (passwordVisible) R.drawable.ic_eye_closed else R.drawable.ic_eye) // TODO Content description
}
val exportDialog = builder.show()

View file

@ -150,6 +150,7 @@
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
android:adjustViewBounds="true"
android:contentDescription="@string/a11y_screenshot"
android:maxWidth="260dp"
android:scaleType="fitCenter"
tools:src="@tools:sample/backgrounds/scenic" />

View file

@ -16,6 +16,7 @@
android:id="@+id/bgCallView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:importantForAccessibility="no"
android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" />
@ -53,6 +54,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:foreground="?attr/selectableItemBackground"
android:importantForAccessibility="no"
android:scaleType="centerCrop"
tools:src="@tools:sample/avatars" />
@ -61,6 +63,7 @@
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_gravity="center"
android:importantForAccessibility="no"
android:src="@drawable/ic_call_small_pause" />
</FrameLayout>
@ -70,6 +73,7 @@
android:layout_width="80dp"
android:layout_height="80dp"
android:contentDescription="@string/avatar"
android:importantForAccessibility="no"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -81,13 +85,13 @@
android:id="@+id/smallIsHeldIcon"
android:layout_width="20dp"
android:layout_height="20dp"
android:importantForAccessibility="no"
android:src="@drawable/ic_call_small_pause"
app:layout_constraintBottom_toBottomOf="@id/otherMemberAvatar"
app:layout_constraintEnd_toEndOf="@id/otherMemberAvatar"
app:layout_constraintStart_toStartOf="@id/otherMemberAvatar"
app:layout_constraintTop_toTopOf="@id/otherMemberAvatar" />
<TextView
android:id="@+id/participantNameText"
android:layout_width="0dp"

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/callDialPad"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -27,10 +28,12 @@
android:id="@+id/callDialPadClose"
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:scaleType="center"
app:tint="?riotx_text_primary"
android:contentDescription="@string/action_close"
android:foreground="?selectableItemBackground"
android:src="@drawable/ic_cross" />
android:scaleType="center"
android:src="@drawable/ic_cross"
app:tint="?riotx_text_primary"
tools:ignore="MissingPrefix" />
</LinearLayout>

View file

@ -47,6 +47,7 @@
android:id="@+id/backupCompleteImage"
android:layout_width="20dp"
android:layout_height="20dp"
android:importantForAccessibility="no"
android:visibility="gone"
app:srcCompat="@drawable/unit_test_ok"
tools:visibility="visible" />

View file

@ -22,6 +22,7 @@
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginTop="@dimen/layout_vertical_margin_big"
android:contentDescription="@string/avatar"
android:elevation="4dp"
android:transitionName="profile"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -45,6 +45,7 @@
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:contentDescription="@string/avatar"
tools:src="@tools:sample/avatars" />
<LinearLayout

View file

@ -46,6 +46,7 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:importantForAccessibility="no"
android:src="@drawable/ic_material_share"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />
@ -77,6 +78,7 @@
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="16dp"
android:importantForAccessibility="no"
android:src="@drawable/ic_material_save"
app:tint="?colorAccent"
tools:ignore="MissingPrefix" />

View file

@ -6,12 +6,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:contentDescription="@string/a11y_open_widget"
android:focusable="true">
<ImageView
android:id="@+id/action_view_icon_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:importantForAccessibility="no"
android:src="@drawable/ic_integrations"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -27,6 +27,7 @@
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:tint="?attr/colorAccent"

View file

@ -26,6 +26,7 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -50,6 +50,7 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -54,9 +54,9 @@
android:layout_gravity="end"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
tools:contentDescription="@string/a11y_show_password"
app:tint="?attr/colorAccent"
tools:ignore="MissingPrefix" />

View file

@ -67,6 +67,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/send"
android:src="@drawable/ic_send"
app:layout_constraintBottom_toTopOf="@id/attachmentPreviewerBottomContainer"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -49,6 +49,7 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -69,6 +69,7 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -29,6 +29,7 @@
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:clickable="true"
android:contentDescription="@string/action_close"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:scaleType="center"

View file

@ -29,6 +29,7 @@
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:clickable="true"
android:contentDescription="@string/action_close"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
android:scaleType="center"

View file

@ -29,6 +29,7 @@
android:id="@+id/createRoomClose"
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:contentDescription="@string/action_close"
android:scaleType="center"
android:src="@drawable/ic_x_18dp"
app:layout_constraintBottom_toBottomOf="parent"

View file

@ -22,6 +22,7 @@
style="@style/VectorDebug"
android:layout_width="@dimen/layout_touch_size"
android:layout_height="@dimen/layout_touch_size"
android:importantForAccessibility="no"
android:scaleType="center"
android:src="@drawable/ic_settings_x"
app:layout_constraintEnd_toEndOf="parent"
@ -35,6 +36,7 @@
android:layout_height="50dp"
android:layout_marginStart="@dimen/layout_horizontal_margin"
android:layout_marginTop="24dp"
android:contentDescription="@string/avatar"
android:transitionName="profile"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"

View file

@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:importantForAccessibility="no"
android:src="@drawable/key_big"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -67,6 +68,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_import_key_from_file"
android:scaleType="center"
android:src="@drawable/ic_import_black"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:importantForAccessibility="no"
android:src="@drawable/key_big"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -67,6 +68,7 @@
android:layout_height="@dimen/layout_touch_size"
android:layout_marginTop="8dp"
android:background="?attr/selectableItemBackground"
android:contentDescription="@string/a11y_show_password"
android:scaleType="center"
android:src="@drawable/ic_eye"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -2829,4 +2829,8 @@
<string name="re_authentication_activity_title">Re-Authentication Needed</string>
<string name="re_authentication_default_confirm_text">Element requires you to enter your credentials to perform this action.</string>
<string name="authentication_error">Failed to authenticate</string>
<string name="a11y_screenshot">Screenshot</string>
<string name="a11y_open_widget">Open widgets</string>
<string name="a11y_import_key_from_file">Import key from file</string>
</resources>