diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/deeplinks/DeepLinksTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/deeplinks/DeepLinksTest.kt
index 2e027717f9..70f31cd55a 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/deeplinks/DeepLinksTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/deeplinks/DeepLinksTest.kt
@@ -26,9 +26,14 @@ import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.accessibility.AccessibilityChecks
import androidx.test.espresso.action.ViewActions.click
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
+import org.hamcrest.Matchers.allOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -54,7 +59,15 @@ class DeepLinksTest : BaseActivityTest() {
private lateinit var sharedPreferenceUtil: SharedPreferenceUtil
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(withContentDescription("More options"))
+ )
+ )
+ }
}
@Before
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/DarkModeViewPainterTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/DarkModeViewPainterTest.kt
index 6f1e0a676d..451aa00a79 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/DarkModeViewPainterTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/DarkModeViewPainterTest.kt
@@ -26,9 +26,14 @@ import androidx.navigation.fragment.NavHostFragment
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
+import org.hamcrest.Matchers.allOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -84,7 +89,17 @@ class DarkModeViewPainterTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt
index 89dc86a71d..e01566a44a 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt
@@ -22,9 +22,14 @@ import androidx.lifecycle.Lifecycle
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
import leakcanary.LeakAssertions
+import org.hamcrest.Matchers.allOf
import org.junit.Before
import org.junit.Rule
import org.junit.Test
@@ -81,7 +86,17 @@ class TopLevelDestinationTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/note/NoteFragmentTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/note/NoteFragmentTest.kt
index c8a745b382..8c9d9ec197 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/note/NoteFragmentTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/note/NoteFragmentTest.kt
@@ -26,14 +26,17 @@ import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
import androidx.test.espresso.matcher.ViewMatchers
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
import com.google.android.apps.common.testing.accessibility.framework.checks.DuplicateClickableBoundsCheck
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
import leakcanary.LeakAssertions
import org.hamcrest.Matchers.allOf
+import org.hamcrest.Matchers.anyOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -96,9 +99,15 @@ class NoteFragmentTest : BaseActivityTest() {
AccessibilityChecks.enable().apply {
setRunChecksFromRootView(true)
setSuppressingResultMatcher(
- allOf(
- matchesCheck(DuplicateClickableBoundsCheck::class.java),
- matchesViews(ViewMatchers.withId(R.id.get_zim_nearby_device))
+ anyOf(
+ allOf(
+ matchesCheck(DuplicateClickableBoundsCheck::class.java),
+ matchesViews(ViewMatchers.withId(R.id.get_zim_nearby_device))
+ ),
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(withContentDescription("More options"))
+ )
)
)
}
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/LibkiwixBookmarkTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/LibkiwixBookmarkTest.kt
index a34defb3ea..13e10d39fb 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/LibkiwixBookmarkTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/LibkiwixBookmarkTest.kt
@@ -26,8 +26,13 @@ import androidx.navigation.fragment.NavHostFragment
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
+import org.hamcrest.Matchers.allOf
import org.junit.Before
import org.junit.Rule
import org.junit.Test
@@ -87,7 +92,17 @@ class LibkiwixBookmarkTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryTest.kt
index 4fc23b75c1..cc0869ae37 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/NavigationHistoryTest.kt
@@ -25,10 +25,15 @@ import androidx.lifecycle.Lifecycle
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
import leakcanary.LeakAssertions
+import org.hamcrest.Matchers.allOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -87,7 +92,17 @@ class NavigationHistoryTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/KiwixReaderFragmentTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/KiwixReaderFragmentTest.kt
index 0186d7e9e1..d2d1ae3b3b 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/KiwixReaderFragmentTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/KiwixReaderFragmentTest.kt
@@ -25,13 +25,18 @@ import androidx.lifecycle.Lifecycle
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
import leakcanary.LeakAssertions
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.ResponseBody
+import org.hamcrest.Matchers.allOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -85,7 +90,17 @@ class KiwixReaderFragmentTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/ZimFileReaderWithSplittedZimFileTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/ZimFileReaderWithSplittedZimFileTest.kt
index 38d31ed4d5..e1f6a80c00 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/ZimFileReaderWithSplittedZimFileTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/reader/ZimFileReaderWithSplittedZimFileTest.kt
@@ -25,9 +25,14 @@ import androidx.lifecycle.Lifecycle
import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesCheck
+import com.google.android.apps.common.testing.accessibility.framework.AccessibilityCheckResultUtils.matchesViews
+import com.google.android.apps.common.testing.accessibility.framework.checks.TouchTargetSizeCheck
+import org.hamcrest.Matchers.allOf
import org.junit.After
import org.junit.Assert
import org.junit.Before
@@ -86,7 +91,17 @@ class ZimFileReaderWithSplittedZimFileTest : BaseActivityTest() {
}
init {
- AccessibilityChecks.enable().setRunChecksFromRootView(true)
+ AccessibilityChecks.enable().apply {
+ setRunChecksFromRootView(true)
+ setSuppressingResultMatcher(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
+ )
+ }
}
@Test
diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/search/SearchFragmentTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/search/SearchFragmentTest.kt
index 90a35f2fff..32f9d77b68 100644
--- a/app/src/androidTest/java/org/kiwix/kiwixmobile/search/SearchFragmentTest.kt
+++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/search/SearchFragmentTest.kt
@@ -26,6 +26,7 @@ import androidx.preference.PreferenceManager
import androidx.test.core.app.ActivityScenario
import androidx.test.espresso.accessibility.AccessibilityChecks
import androidx.test.espresso.matcher.ViewMatchers
+import androidx.test.espresso.matcher.ViewMatchers.withContentDescription
import androidx.test.internal.runner.junit4.statement.UiThreadStatement
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -39,6 +40,7 @@ import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.ResponseBody
import org.hamcrest.Matchers.allOf
+import org.hamcrest.Matchers.anyOf
import org.junit.After
import org.junit.Before
import org.junit.Rule
@@ -109,9 +111,17 @@ class SearchFragmentTest : BaseActivityTest() {
AccessibilityChecks.enable().apply {
setRunChecksFromRootView(true)
setSuppressingResultMatcher(
- allOf(
- matchesCheck(TouchTargetSizeCheck::class.java),
- matchesViews(ViewMatchers.withId(id.menu_searchintext))
+ anyOf(
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(ViewMatchers.withId(id.menu_searchintext))
+ ),
+ allOf(
+ matchesCheck(TouchTargetSizeCheck::class.java),
+ matchesViews(
+ withContentDescription("More options")
+ )
+ )
)
)
}
diff --git a/app/src/main/res/layout/fragment_destination_download.xml b/app/src/main/res/layout/fragment_destination_download.xml
index 1d8b7c9aea..f07c90f284 100644
--- a/app/src/main/res/layout/fragment_destination_download.xml
+++ b/app/src/main/res/layout/fragment_destination_download.xml
@@ -68,6 +68,7 @@
diff --git a/core/src/main/res/layout/layout_donation_bottom_sheet.xml b/core/src/main/res/layout/layout_donation_bottom_sheet.xml
index 529a12e763..c89f59cd35 100644
--- a/core/src/main/res/layout/layout_donation_bottom_sheet.xml
+++ b/core/src/main/res/layout/layout_donation_bottom_sheet.xml
@@ -18,6 +18,7 @@
@@ -69,7 +69,7 @@
android:layout_height="wrap_content"
android:padding="@dimen/activity_horizontal_margin"
android:text="@string/rate_dialog_neutral"
- android:textColor="@color/denim_blue800"
+ android:textColor="?attr/colorPrimary"
app:layout_constraintEnd_toStartOf="@+id/donateButton"
app:layout_constraintTop_toBottomOf="@id/descriptionText" />
@@ -79,7 +79,7 @@
android:layout_height="wrap_content"
android:padding="@dimen/activity_horizontal_margin"
android:text="@string/make_donation"
- android:textColor="@color/denim_blue800"
+ android:textColor="?attr/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/descriptionText" />