Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix accessibility issues for the menu and linting warnings
  • Loading branch information
Gerardo committed Jun 30, 2023
commit 7b5d0cebe10a32dc6a098e77cbae3ab3665ec02d
14 changes: 9 additions & 5 deletions WordPress/src/main/res/layout/edit_post_header.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<RelativeLayout
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:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerVertical="true">
Expand All @@ -9,11 +10,13 @@
android:id="@+id/close_editor"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignBottom="@id/close_editor_button"
android:layout_alignParentStart="true"
android:layout_alignTop="@id/close_editor_button"
android:layout_alignBottom="@id/close_editor_button"
android:background="@null"
android:importantForAccessibility="no"
android:src="@drawable/chevron_down"
android:clickable="false"
android:visibility="visible" />

<androidx.cardview.widget.CardView
Expand All @@ -29,19 +32,20 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:contentDescription="@string/menu_site_icon_context"
android:src="@drawable/bg_rectangle_placeholder_globe_32dp"
android:visibility="visible" />
android:visibility="visible"
tools:ignore="TouchTargetSizeCheck" />

</androidx.cardview.widget.CardView>

<Button
android:id="@+id/close_editor_button"
android:layout_width="57dp"
android:layout_height="57dp"
android:layout_centerVertical="true"
android:background="?android:attr/actionBarItemBackground"
android:clickable="true"
android:contentDescription="@string/menu_close_editor"
android:textColor="@android:color/transparent"
android:layout_centerVertical="true" />
android:textColor="@android:color/transparent" />

</RelativeLayout>
5 changes: 3 additions & 2 deletions WordPress/src/main/res/layout/edit_post_menu_redo_item.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
Expand All @@ -12,6 +12,7 @@
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?android:attr/actionBarItemBackground"
android:contentDescription="@string/menu_redo_context"
android:src="@drawable/redo" />

</FrameLayout>
</LinearLayout>
19 changes: 7 additions & 12 deletions WordPress/src/main/res/layout/edit_post_menu_undo_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
android:paddingBottom="12dp"
android:paddingRight="8dp">

<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/menu_undo_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?android:attr/actionBarItemBackground"
android:src="@drawable/undo"/>

</FrameLayout>
<ImageView
android:id="@+id/menu_undo_icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:background="?android:attr/actionBarItemBackground"
android:contentDescription="@string/menu_undo_context"
android:src="@drawable/undo" />

</LinearLayout>
12 changes: 8 additions & 4 deletions WordPress/src/main/res/menu/edit_post.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@

<menu
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" >

<item
android:id="@+id/menu_undo_action"
android:title="@string/menu_undo"
app:actionLayout="@layout/edit_post_menu_undo_item"
app:showAsAction="always"
android:title="@string/menu_undo"/>
tools:ignore="AlwaysShowAction" />

<item
android:id="@+id/menu_redo_action"
app:actionLayout="@layout/edit_post_menu_redo_item"
app:showAsAction="always"
android:title="@string/menu_redo"/>
android:title="@string/menu_redo"
tools:ignore="AlwaysShowAction" />

<item
android:id="@+id/menu_primary_action"
android:title="@string/post_status_publish_post"
app:showAsAction="always" >
app:showAsAction="always"
tools:ignore="AlwaysShowAction" >
</item>

<group
Expand Down
4 changes: 4 additions & 0 deletions WordPress/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,10 @@

<string name="menu_undo">Undo</string>
<string name="menu_redo">Redo</string>
<string name="menu_undo_context">Undo last change</string>
<string name="menu_redo_context">Redo last change</string>
<string name="menu_site_icon_context">Site icon</string>

<string name="menu_close_editor">Close editor</string>
<string name="menu_debug">Debug Menu</string>
<string name="menu_switch_to_gutenberg_editor">Switch to block editor</string>
Expand Down