mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 06:15:12 +00:00
a11y dynamic content descriptions for scope toggles on profile
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
d54b3f3d0a
commit
188e33538e
@ -749,14 +749,36 @@ public class ProfileController extends BaseController {
|
||||
|
||||
switch (item.scope) {
|
||||
case PRIVATE:
|
||||
holder.scope.setImageResource(R.drawable.ic_password);
|
||||
holder.scope.setContentDescription(
|
||||
controller.getActivity().getResources().getString(
|
||||
R.string.scope_toggle_description,
|
||||
item.hint,
|
||||
controller.getActivity().getString(R.string.scope_private_title)));
|
||||
break;
|
||||
case LOCAL:
|
||||
holder.scope.setImageResource(R.drawable.ic_password);
|
||||
holder.scope.setContentDescription(
|
||||
controller.getActivity().getResources().getString(
|
||||
R.string.scope_toggle_description,
|
||||
item.hint,
|
||||
controller.getActivity().getString(R.string.scope_local_title)));
|
||||
break;
|
||||
case FEDERATED:
|
||||
holder.scope.setImageResource(R.drawable.ic_contacts);
|
||||
holder.scope.setContentDescription(
|
||||
controller.getActivity().getResources().getString(
|
||||
R.string.scope_toggle_description,
|
||||
item.hint,
|
||||
controller.getActivity().getString(R.string.scope_federated_title)));
|
||||
break;
|
||||
case PUBLISHED:
|
||||
holder.scope.setImageResource(R.drawable.ic_link);
|
||||
holder.scope.setContentDescription(
|
||||
controller.getActivity().getResources().getString(
|
||||
R.string.scope_toggle_description,
|
||||
item.hint,
|
||||
controller.getActivity().getString(R.string.scope_published_title)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
android:layout_width="@dimen/iconized_single_line_item_icon_size"
|
||||
android:layout_height="@dimen/iconized_single_line_item_icon_size"
|
||||
android:layout_marginStart="@dimen/standard_margin"
|
||||
android:contentDescription="@string/account_icon"
|
||||
android:contentDescription="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -408,6 +408,7 @@
|
||||
<string name="scope_published_title">Published</string>
|
||||
<string name="scope_published_description">Synchronize to trusted servers and the global and public address book</string>
|
||||
<string name="scope_toggle">Scope toggle</string>
|
||||
<string name="scope_toggle_description">Scope toggle for %1$s (%2$s)</string>
|
||||
|
||||
<!-- App Bar -->
|
||||
<string name="appbar_search_in">Search in %s</string>
|
||||
|
Loading…
Reference in New Issue
Block a user