Improved nav accessibility

pull/203/head
M66B 3 years ago
parent ceacbf13fc
commit df3b85086c

@ -1871,6 +1871,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibInbox.setVisibility(tools && inbox ? View.VISIBLE : View.GONE);
ibMore.setVisibility(tools && !outbox ? View.VISIBLE : View.GONE);
ibTools.setImageLevel(tools ? 0 : 1);
ibTools.setContentDescription(context.getString(tools ? R.string.title_less : R.string.title_more));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibTools.setTooltipText(ibTools.getContentDescription());
ibTools.setVisibility(outbox ? View.GONE : View.VISIBLE);
ibTrashBottom.setVisibility(button_extra && button_trash && trash ? View.VISIBLE : View.GONE);
@ -2169,7 +2172,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibFull.setEnabled(hasWebView);
ibFull.setImageResource(show_full ? R.drawable.twotone_fullscreen_exit_24 : R.drawable.twotone_fullscreen_24);
ibFull.setContentDescription(context.getString(show_full
? R.string.title_legend_show_reformatted
: R.string.title_legend_show_full));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibFull.setTooltipText(ibFull.getContentDescription());
ibImages.setImageResource(show_images ? R.drawable.twotone_article_24 : R.drawable.twotone_image_24);
ibImages.setContentDescription(context.getString(show_images
? R.string.title_legend_hide_images
: R.string.title_legend_show_images));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibImages.setTooltipText(ibImages.getContentDescription());
if (show_full) {
// Create web view

@ -56,10 +56,10 @@
android:layout_width="36dp"
android:layout_height="36dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/title_more"
android:contentDescription="@string/title_advanced_more"
android:padding="6dp"
android:scaleType="fitCenter"
android:tooltipText="@string/title_more"
android:tooltipText="@string/title_advanced_more"
app:srcCompat="@drawable/twotone_more_horiz_24"
tools:ignore="MissingConstraints" />

@ -996,6 +996,7 @@
<string name="title_subscribe">Subscribe</string>
<string name="title_delete">Delete</string>
<string name="title_more">More</string>
<string name="title_less">Less</string>
<string name="title_spam">Spam</string>
<string name="title_move">Move</string>
<string name="title_copy_btn">Copy</string>
@ -1508,7 +1509,9 @@
<string name="title_legend_create_rule">Create rule</string>
<string name="title_legend_show_unsubscribe">Unsubscribe from list</string>
<string name="title_legend_show_images">Show images</string>
<string name="title_legend_hide_images">Hide images</string>
<string name="title_legend_show_full">Show original message</string>
<string name="title_legend_show_reformatted">Show reformatted message</string>
<string name="title_legend_edit">Edit</string>
<string name="title_legend_default_color">Default color</string>
<string name="title_legend_close_hint">Close hint</string>

Loading…
Cancel
Save