Closed Bug 1398836 Opened 7 years ago Closed 3 years ago

[a11y] Activity Stream topsites: off-screen top sites announcements

Categories

(Firefox for Android Graveyard :: Activity Stream, enhancement, P3)

All
Android
enhancement

Tracking

(fennec+)

RESOLVED INCOMPLETE
Tracking Status
fennec + ---

People

(Reporter: mcomella, Unassigned)

References

Details

(Whiteboard: [mobileAS][see comment 9])

When you swipe to navigate, talkback will announce off screen items in the TopSitesPanel. Break out from bug 1315197 comment 7.
Whiteboard: [mobileAS]
The layout of the top sites is:
- Top sites is contained in an RtlViewPager
- Each page in the ViewPager is a RecyclerView of vertical orientation
- Each top site item is of a dynamically calculated size we set when binding; thus the margins are filled in automatically because the item size is constrained.
- The adapter is constrained to 8 items so we display 2 rows, based on the calculated widths

So for some reason the RtlViewPager is inflating both views such that they're both visible to Talkback – we should see how we solve this problem for the home panels ViewPager (I think we might detach the relevant fragments).
Eitan felt this is important so we're going to try to fix this too. However, I think the other a11y bugs are more important so maybe we'll focus on those first.
tracking-fennec: --- → +
Iteration: --- → 1.30
Rank: 3 → 2
Priority: P2 → P1
Assigning so I can keep track of this - feel free to take if I haven't made progress.

There are two approaches I can think of here:
1) (maybe too complex) Make Talkback scroll to between pages when swiping between items (we'd probably have to announce, "Page 2 of 2" too). We might be able to do this by adding an accessibility delegate and when we hit an item on a new page, calling, "ViewPager.scrollToPage" or whatever.
+ Allows the user to navigate between pages in swipe mode
+ Allows the user to more easily discover the multiple pages
- Might be unintuitive where that the page is scrolling and where the previous set of items went (hence why we'd probably need the page # announcements)

2) setImportantForAccessibility=noHideDescendants for the inactive pages and update each time the active page changes. This might not gracefully handle refocusing the first item, or the page, when the new page is shown.
+ Likely simpler and less likely to break than #1
- Hard to discover: the only way to discover is to focus the page view (which announces it has pages) and know to scroll horizontally to the next page without accidentally scrolling to the Bookmarks page. I expect page view will only be focusable in the 10 dp margins next to the screen edge after bug 1400014, however, so this still won't be discoverable.
Assignee: nobody → michael.l.comella
wrt discoverability in #2, :eeejay mentions in bug 1315197 comment 27:

> You should always hear the name of the container you are entering, the app being another container.

So another problem here is that we're not announcing the ViewPager each time we enter top sites. If we do, the two approaches could be broken up as:
1) Make swipe-to-navigate move to the next page (slightly more complex)
2) Don't make swipe-to-navigate move to the next page (slightly less complex)
We're basically at the 57 merge and I have other higher priority a11y issues to look at: unassigning.
Assignee: michael.l.comella → nobody
:eeejay helped me prioritize the open a11y issues: he suggested P1 but I think this is a large undertaking: how do others solve this problem? How should it be solved by the framework? How do we not come up with a hacky solution?
Rank: 2 → 1
Priority: P1 → P2
Iteration: 1.30 → ---
All open Activity Stream bugs are moving from the whiteboard tag, "[mobileAS]", to the Firefox for Android component, "Activity Stream", so that I can keep better track of these bugs as the new triage owner; I will send out an email shortly with additional details, caveats, etc.
Component: Awesomescreen → Activity Stream
:eeejay mentioned this is a larger issue than just AS: you can announce off-screen views by swiping to navigate from both the History tab and the Bookmarks tab. We're using standard Android components (ViewPager) so I'm not sure why this behaves incorrectly. Perhaps we need to update the support library version.
(In reply to Michael Comella (:mcomella) from comment #8)
> :eeejay mentioned this is a larger issue than just AS: you can announce
> off-screen views by swiping to navigate from both the History tab and the
> Bookmarks tab. We're using standard Android components (ViewPager) so I'm
> not sure why this behaves incorrectly. Perhaps we need to update the support
> library version.

I filed bug 1403995 for this.

---

For this bug, here's the suggested fix:

(In reply to Eitan Isaacson [:eeejay] from bug 1403006 comment #1)
> Maybe a good solution would be if a talkback cursor swipe past the last top
> site would scroll the next top sites pane into view and put the cursor on
> the first tile there.
> 
> Aside from that I would remove the swipe hint that talkback gives when
> landing on the top sites.

Eitan, to be explicit, "the swipe hint that talkback gives when landing on top sites" would be Talkback describing the Top Sites view as a "Multipage view" and (sometimes) "Page 1 of 2"?

Though perhaps an explicit swipe hint was added in Oreo that I'm unaware of.
Flags: needinfo?(eitan)
Whiteboard: [mobileAS] → [mobileAS][see comment 9]
Correct. I don't know where it comes from, but the "top sites" gets a swipe hint in talkback. Ideally, you would have the swipe hint be for tab changes (top sites -> bookmarks -> history).
Flags: needinfo?(eitan)
[triage] Bulk edit from title: this is a non-critical issue. Please remove priority if you wish this to be re-triaged.
Priority: P2 → P3
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.