browse: missing nav on accessibility jump
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- accessibility, mobile, testing
Research direction
Start with AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt and the existing withBrowserAfterTouch tests. Run the new regression test to confirm that an accessibility jump to row five leaves the bottom navigation hidden, then trace the browser scroll handling that updates HideViewOnScrollBehavior. Done means accessibility scrolling restores the navigation and the regression test passes.
Written by the indexing model from the issue text.
Description
Subject: [PATCH] [EXISTING] test(browse): record missing nav on accessibility jump
---
Index: AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt b/AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt
--- a/AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt (revision 1d7069aafdd8a0cdc6afa17486841adaccc6c4fb)
+++ b/AnkiDroid/src/test/java/com/ichi2/anki/BottomNavigationScrollTest.kt (revision c2d39c39021011ec03bd01d1bdf0b4a1ee8d07da)
@@ -4,6 +4,7 @@
package com.ichi2.anki
import android.content.Intent
+import android.os.Bundle
import android.os.Looper
import android.os.SystemClock
import android.view.InputDevice
@@ -17,6 +18,7 @@
import android.widget.ScrollView
import android.widget.TextView
import androidx.core.view.ViewCompat
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityActionCompat
import androidx.core.view.marginBottom
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
@@ -374,6 +376,23 @@
equalTo(true),
)
}
+
+ @Test
+ @ExistingIssue
+ fun `an accessibility jump to an earlier row restores browser navigation`() =
+ withBrowserAfterTouch { activity, list ->
+ val layout = list.layoutManager as LinearLayoutManager
+ val args = Bundle().apply { putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_ROW_INT, 5) }
+ assertThat(list.performAccessibilityAction(AccessibilityActionCompat.ACTION_SCROLL_TO_POSITION.id, args), equalTo(true))
+ advanceRobolectricLooper()
+
+ assertThat("the accessibility action jumped to row five", layout.findFirstVisibleItemPosition(), equalTo(5))
+ assertThat(
+ "accessibility scrolling restores navigation",
+ HideViewOnScrollBehavior.from(activity.bottomNav).isScrolledIn,
+ equalTo(true),
+ )
+ }
private fun withBrowserAfterTouch(test: (DeckPicker, RecyclerView) -> Unit) {
repeat(80) { addBasicNote("Card $it", "Answer") }
- Dominant language
- Kotlin
- Stars
- 12.3k
- Forks
- 3.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 383
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ankidroid/Anki-Android
-
Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ankidroid/Anki-Android#23392 ·
Maintainers usually reply within 1 day
-
Needs Triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ankidroid/Anki-Android#23390 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ankidroid/Anki-Android#23385 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
ankidroid/Anki-Android#23374 ·
Maintainers usually reply within 1 day
-
Selected custom-study tags become unreadablePossibly taken @chesh-ire claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ankidroid/Anki-Android#23352 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in ankidroid/Anki-Android
Similar issues
-
Bug Domain changed
Difficulty 1/5 Under an hour Newbie friendliness 79/100
keiyoushi/extensions-source#21174 ·
Maintainers usually reply within 1 day
-
Unified account interface not translated into Simplified ChinesePossibly taken @xuenhua claimed this 3 days ago. Openunconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
thunderbird/thunderbird-android#11936 · 1 comment ·
Maintainers usually reply within 3 days
-
Update toast stylingOpendesign good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
scribe-org/Scribe-Android#778 ·
Maintainers usually reply within 1 day
-
AI Generated CI/CD ⚒️ Flaky-tests 🐦 go 🏃
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
valkey-io/valkey-glide#7772 ·
Maintainers usually reply within 1 day
-
Error Handling Swift
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/wordpress-rs#1759 ·
Maintainers usually reply within 1 day