Skip to content

showOnScreen / getOffsetToReveal doesn't take status bar into consideration #11663

Closed

Description

@goderbauer

This is a problem for a11y. When an item is partly covered by the status bar and a11y focus is moved to it, Android issues a showOnScreen action, which is handled by [1]. It will currently calculate via [2] that the item needs to be aligned with the upper edge of the screen. This is incorrect. It should be aligned with the lower edge of the status bar.

While this sounds like just a visual annoyance, it can actually cause a11y users to get stuck: When the list is scrolled all the way to the bottom, the showOnScreen action should scroll it down a little. Instead, we currently try to scroll up, but that's not possible as we are already at the end. The user needs to resort to two finger scrolling to get out of this situation.

[1]

void showOnScreen([RenderObject child]) {

[2]
double getOffsetToReveal(RenderObject target, double alignment) {

Activity

  1. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    f: scrollingViewports, list views, slivers, etc.
    on Aug 17, 2017
  2. Hixie commented on Aug 17, 2017

    @Hixie
    Contributor

    We should probably make the "scroll into view" logic optionally take a rect that describes the "view". Then the accessibility code could just exclude any system-level padding when giving it the instruction to scroll.

  3. added this to the milestone on Dec 20, 2017
  4. github-actions commented on Aug 15, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: scrollingViewports, list views, slivers, etc.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions