Login: add contentDescription to password reveal
Signed-off-by: Peter Vágner <pvdeejay@gmail.com>
This commit is contained in:
parent
d4be68191c
commit
53543453b3
@ -143,6 +143,7 @@ class LoginFragment : VectorBaseFragment() {
|
|||||||
passwordField.showPassword(passwordShown)
|
passwordField.showPassword(passwordShown)
|
||||||
|
|
||||||
passwordReveal.setImageResource(if (passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
|
passwordReveal.setImageResource(if (passwordShown) R.drawable.ic_eye_closed_black else R.drawable.ic_eye_black)
|
||||||
|
passwordReveal.setContentDescription(if (passwordShown) getString(R.string.a11y_hide_password) else getString(R.string.a11y_show_password))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun invalidate() = withState(viewModel) { state ->
|
override fun invalidate() = withState(viewModel) { state ->
|
||||||
@ -217,4 +218,4 @@ class LoginFragment : VectorBaseFragment() {
|
|||||||
is Success -> Unit
|
is Success -> Unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:background="?attr/selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
|
android:contentDescription="@string/a11y_show_password"
|
||||||
android:src="@drawable/ic_eye_black"
|
android:src="@drawable/ic_eye_black"
|
||||||
android:tint="?attr/colorAccent" />
|
android:tint="?attr/colorAccent" />
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
<string name="a11y_create_direct_message">Create a new direct conversation</string>
|
<string name="a11y_create_direct_message">Create a new direct conversation</string>
|
||||||
<string name="a11y_create_room">Create a new room</string>
|
<string name="a11y_create_room">Create a new room</string>
|
||||||
<string name="a11y_close_keys_backup_banner">Close keys backup banner</string>
|
<string name="a11y_close_keys_backup_banner">Close keys backup banner</string>
|
||||||
|
<string name="a11y_show_password">Show password</string>
|
||||||
|
<string name="a11y_hide_password">Hide password</string>
|
||||||
|
|
||||||
<!-- Read receipts list a11y -->
|
<!-- Read receipts list a11y -->
|
||||||
<string name="two_and_some_others_read">%s, %s and %d others read</string>
|
<string name="two_and_some_others_read">%s, %s and %d others read</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user