Skip to content

Screen does not scroll correctly when using an Accessibility Screen Reader #104036

@hamishnorton

Description

@hamishnorton

Internal: b/246320262

Steps to Reproduce

Given

  1. Flutter web application with content that is greater than the height of the view port

  2. Using a Screen Reader ( [NVDA](https://www.nvaccess.org/download/), version: 2021.3.3) to navigate

  3. Browsers

    1. Google Chrome: Version 101.0.4951.67 (Official Build) (64-bit)
    2. Microsoft Edge: Version 101.0.1210.39 (Official build) (64-bit)
  4. Flutter (3.0.0, 2.10.3)

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.19043.1706], locale en-NZ)
    [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Professional 2019 16.11.5)
    [√] Android Studio (version 2021.2)
    [√] IntelliJ IDEA Ultimate Edition (version 2022.1)
    [√] VS Code (version 1.67.1)
    [√] Connected device (3 available)
    ! Device emulator-5554 is offline.
    [√] HTTP Host Availability

    • No issues found!

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 2.10.2, on Microsoft Windows [Version 10.0.19043.1706], locale en-NZ)
    [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Professional 2019 16.11.5)
    [√] Android Studio (version 2021.2)
    [√] IntelliJ IDEA Ultimate Edition (version 2022.1)
    [√] VS Code (version 1.67.1)
    [√] Connected device (3 available)
    [√] HTTP Host Availability

    • No issues found!

When

  1. You run the application and adjust the browser view port to 350px
  2. Then navigate reading with NVDA by pressing “Arrow Down” to read the whole page

Then

  1. You’ll notice that the page scrolling jumps around, and doesn’t scroll with the items that are being read out.

Expected results:

Page to scroll with the navigation of the screen reader, as it does for other web pages

Actual results:

The page doesn't scroll, and the scrollbar jumps, but doesn't scroll down.

Code sample
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

void main() {
  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    RendererBinding.instance.setSemanticsEnabled(true);
    return MaterialApp(
      title: 'Flutter NVDA pageflap',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Screen(),
    );
  }
}

class Screen extends StatelessWidget {
  const Screen({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: LayoutBuilder(
        builder: (BuildContext context, BoxConstraints viewportConstraints) {
          return SingleChildScrollView(
            child: Container(
              constraints: BoxConstraints(
                minHeight: viewportConstraints.maxHeight,
                maxWidth: 300,
              ),
              padding: const EdgeInsets.all(50.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.start,
                children: [
                  const Text(
                    'Adjust browser window height to: 350',
                  ),
                  Text(
                    'Top. current screen height: ${MediaQuery.of(context).size.height}',
                  ),
                  const Text(
                    'Start NVDA, use "Arrow Down" to read the text.',
                  ),
                  const Text(
                    'Notice how the scroll jumps',
                  ),
                  const Text(
                    'The page should scroll with the reading',
                  ),
                  const Text(
                      '1. Start. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. 1. End.'),
                  const Text(
                      '2. Start. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. 2. End'),
                  const Text(
                      '3. Start. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. 3. End'),
                  const Text(
                      '4. Start. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. 4. End.'),
                  const Text(
                    'Bottom.',
                  ),
                ],
              ),
            ),
          );
        },
      ),
    );
  }
}

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: desktopRunning on desktopf: scrollingViewports, list views, slivers, etc.found in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions