[VoiceOver] Unable to move to correct next item during continuous reading
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ios, swift
- Domain
- accessibility, mobile
Research direction
Start by reviewing the issue’s reproduction steps and the two proposed solutions in the comment thread, then reproduce the VoiceOver behavior in the R2 test app or Safari. The issue mentions core.css in the attached book as an experiment; done means moving to the next item lands at the next paragraph or another separator within the current paragraph, rather than at the end of a larger selected block.
Written by the indexing model from the issue text.
Description
Bug Report
What happened?
When VoiceOver is active and the user enables continuous reading (two-finger swipe down), the gesture to move to the next paragraph (single finger swipe right) may jump to the end of the chapter, and not to the next paragraph as in non-continuous reading mode.
The issue appears to be a Safari/WKWebView bug, because I have reproduced it there too. However, in normal Safari usage this manifests itself much less frequently (more on why later).
This clip shows the problem in the R2 test app:
https://user-images.githubusercontent.com/289104/128434086-29692730-b32d-455b-a2f9-76281bcf0468.mov
And this shows the problem in Safari:
https://user-images.githubusercontent.com/289104/128432282-1dc40778-8cb4-4045-8201-a8aee4c3c8a0.mov
In both clips I start in single-item reading mode and then enable continuous reading (larger box is selected), and at that point a swipe to the next item brings you to the end of the chapter in the test app (the bottom left arrow is selected), and in Safari to the first word in italics. Both are after several paragraphs away from the reading point.
Expected behavior
Moving to the next item should bring you to either the next paragraph or any other separating item (such as a differently formatted word, or the end of a sentence) within the current paragraph.
How to reproduce?
- Launch R2 app and enable VoiceOver.
- Open Moby Dick or any other book.
- One finger single tap to begin play paragraph A.
- Two fingers swipe down to turn on continuous read: at this point a large block of text is selected, including (e.g.) paragraphs A, B, C.
- While Paragraph A is still being read, do a 2 fingers single tap to pause.
- Now swipe left to right to move to the item after the item that was being read (usually "item" means paragraph)
Observed: the reading position is changed to the end of the selected (large) block of text, i.e. end of paragraph C. In the R2 testapp clip above, this is the end of the chapter, because the continuous reading selection extended until the end of the entire chapter. In the Safari example the selection stopped at the first word that was formatted differently (with a span): if the Moby Dick contained a similar span, the same would have happened there.
Desired: the position should be moved to the next paragraph (B) at most.
This zip contains the first chapter of Little Women, which is in the public domain and it's what I used to reproduce the problem in Safari:
littel-women-ch1.zip
Environment
Mobile Safari
R2 testapp 2.2.0 -- The same happens with current top of develop
Readium versions
r2-shared-swift: 2.1.0r2-streamer-swift: 2.1.0r2-navigator-swift: 2.1.0r2-lcp-swift: 2.1.0
Development environment
macOS: 10.15.7
platform: x86_64
carthage: 0.38.0
Xcode 12.4
Build version 12D4e
Testing device
- iOS version: 14.6
- Model: iPhone 11
- Is it an emulator? no -- but I also reproduced it in simulators
Additional context
- Are you willing to fix the problem and contribute a pull request? Yes
I identified the problem in how VoiceOver decides to group blocks of identically formatted text together when continuous reading is enabled. If paragraphs are visually pretty close to each other, the enclosing box may group the entire chapter together in one single block. This is what happens in the Moby Dick example.
If we forcibly separate paragraphs by at least 1em via a custom CSS, VoiceOver will react by grouping text in smaller "boxes" that should coincide with what a typical user considers a paragraph. You can verify this in Safari by adding at the bottom of the core.css in the attached zip:
p {
margin-bottom: 1em !important;
}
Note that this solution is imperfect, because different EPUBS will use different tags to represent paragraphs. But in our testing this seems to work pretty reliably. We have yet to find a book where it does not work.
I have 2 solutions in mind but I am not sure which one (if any) is more appropriate. I will illustrate both.
- Dominant language
- Swift
- Stars
- 557
- Forks
- 249
- Avg merge
- 3h 52m
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No 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 readium/swift-toolkit
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
readium/swift-toolkit#954 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
readium/swift-toolkit#841 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 57/100
readium/swift-toolkit#961 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
readium/swift-toolkit#959 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
readium/swift-toolkit#953 ·
Maintainers usually reply within 1 day
All issues in readium/swift-toolkit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
haacked/switchboard#718 ·
Maintainers usually reply within 1 day
-
validate_app_localizations: harden stringsdict checks (None format key, count-less 'one' in ru/pl)Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OneBusAway/onebusaway-ios#2137 ·
Maintainers usually reply within 1 day
-
area: notifications S3: minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
manaflow-ai/cmux#74631 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Automattic/pocket-casts-ios#5823 ·
Maintainers usually reply within 1 day