Skip to content

[Web] Unable to type in TextField when ensureSemantics is enabled for accessibility #129324

Closed

Description

@jmandawg

Is there an existing issue for this?

Steps to reproduce

Run this sample code below you will not be able to type in the text field. Comment out the

SemanticsBinding.instance.ensureSemantics();

And you will be able to type in the text field.

Expected results

Be able to type in TextField

Actual results

Cannot type in TextField

Code sample

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

/// Flutter code sample for [EditableText.onChanged].

void main() {
  runApp(const OnChangedExampleApp());
  SemanticsBinding.instance.ensureSemantics();
  }

class OnChangedExampleApp extends StatelessWidget {
  const OnChangedExampleApp({super.key});


  static Route<dynamic> onGenerateRoutes() {
    return MaterialPageRoute(
          builder: (_) => const Center()
        );
  }

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: OnChangedExample(),
    );
  }
}

class OnChangedExample extends StatefulWidget {
  const OnChangedExample({super.key});

  @override
  State<OnChangedExample> createState() => _OnChangedExampleState();
}

class _OnChangedExampleState extends State<OnChangedExample> {
  final TextEditingController _controller = TextEditingController();

  final _navigator = GlobalKey<NavigatorState>();

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Column(
          mainAxisSize: MainAxisSize.max,
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            TextField(
          onTap: (){
            print('Tap me');
          },
          autofocus: false,
        ),
            Expanded(
              child: Stack(
                children: [
                  Positioned.fill(
                    child: Row(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Expanded(
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.stretch,
                            children: [
                              Expanded(
                                child: 
                                Navigator(
                                  key: _navigator,
                                  initialRoute: '/',
                                  onGenerateRoute: (settings) =>
                                      OnChangedExampleApp.onGenerateRoutes(),
                                )
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ],
              ),
            )
          ],
        ),
      );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[!] Flutter (Channel unknown, 3.10.3, on macOS 13.4 22F66 darwin-arm64, locale en-US)
    ! Flutter version 3.10.3 on channel unknown at /Users/john/tools/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision f92f44110e (3 weeks ago), 2023-06-01 18:17:33 -0500
    • Engine revision 2a3401c9bb
    • Dart version 3.0.3
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/john/Library/Android/sdk
    • Platform android-33, build-tools 31.0.0
    • ANDROID_HOME = /Users/john/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/john/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Chromium.app/Contents/MacOS/Chromium

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] IntelliJ IDEA Community Edition (version 2021.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Chromium 115.0.5789.0

[✓] Network resources
    • All expected network resources are available.

Activity

  1. dam-ease commented on Jun 22, 2023

    @dam-ease

    Thanks for filing this issue @jmandawg. I am able to reproduce this on the latest master and stable channels with both web renderers.

    flutter doctor -v

    [✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale
        en-NG)
        • Flutter version 3.10.5 on channel stable at /Users/dammya/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 796c8ef792 (8 days ago), 2023-06-13 15:51:02 -0700
        • Engine revision 45f6e00911
        • Dart version 3.0.5
        • DevTools version 2.23.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version
        32.1.0-rc1)
        • Android SDK at /Users/dammya/Library/Android/sdk
        • Platform android-33, build-tools 32.1.0-rc1
        • ANDROID_HOME = /Users/dammya/Library/Android/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          11.0.12+0-b1504.28-7817840)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E300c
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          11.0.12+0-b1504.28-7817840)
    
    [✓] IntelliJ IDEA Community Edition (version 2022.3.2)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.79.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (5 available)
        • sdk gphone arm64 (mobile) • emulator-5554                        •
          android-arm64  • Android 11 (API 30) (emulator)
        • iPhone 14 (mobile)        • 5FE8DE93-0F4C-45BA-8BED-BC9CD69B35D1 • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • iPhone 14 Pro (mobile)    • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • macOS (desktop)           • macos                                •
          darwin-arm64   • macOS 13.4 22F66 darwin-arm64
        • Chrome (web)              • chrome                               •
          web-javascript • Google Chrome 114.0.5735.133
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
    [✓] Flutter (Channel master, 3.12.0-8.0.pre.19, on macOS 13.4 22F66 darwin-arm64, locale en-NG)
        • Flutter version 3.12.0-8.0.pre.19 on channel master at /Users/dammya/fvm/versions/master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 15d594c256 (4 hours ago), 2023-06-22 01:13:14 -0400
        • Engine revision d9530e2b87
        • Dart version 3.1.0 (build 3.1.0-236.0.dev)
        • DevTools version 2.24.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
        • Android SDK at /Users/dammya/Library/Android/sdk
        • Platform android-33, build-tools 32.1.0-rc1
        • ANDROID_HOME = /Users/dammya/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E300c
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    
    [✓] IntelliJ IDEA Community Edition (version 2022.3.2)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.79.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (5 available)
        • sdk gphone arm64 (mobile) • emulator-5554                        • android-arm64  • Android 11 (API 30) (emulator)
        • iPhone 14 (mobile)        • 5FE8DE93-0F4C-45BA-8BED-BC9CD69B35D1 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • iPhone 14 Pro (mobile)    • DCF2031A-7EA9-42FF-8CD4-D4584F3E7A6D • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • macOS (desktop)           • macos                                • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
        • Chrome (web)              • chrome                               • web-javascript • Google Chrome 114.0.5735.133
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
    

  2. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    platform-webWeb applications specifically
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Jun 22, 2023
  3. htoor3 commented on Jun 29, 2023

    @htoor3
    Contributor

    There seems to be an interaction with Navigator in semantic mode that's preventing the DOM input element from being created, which is causing the issue. Will investigate this further

  4. added
    P2Important issues not at the top of the work list
    on Jun 29, 2023
  5. 66 remaining items

  6. Hari-07 commented on May 12, 2026

    @Hari-07
    Member

    Unfortunately We ended up losing some funding due to this bug because we cannot support full ADA feature set on web. We are no longer permitted to use flutter for web at our company going forward with plans to migrate off flutter for web by next year. It's hard to explain to leadership why this works so easily in other web technologies but has been broken here for over 2 years.

    Just curious, if it's that essential to the funding itself, why not upstream a fix? It's open source after all

  7. jmandawg commented on May 12, 2026

    @jmandawg
    Author

    Unfortunately We ended up losing some funding due to this bug because we cannot support full ADA feature set on web. We are no longer permitted to use flutter for web at our company going forward with plans to migrate off flutter for web by next year. It's hard to explain to leadership why this works so easily in other web technologies but has been broken here for over 2 years.

    Just curious, if it's that essential to the funding itself, why not upstream a fix? It's open source after all

    It was just a small portion of the funding, we did not upstream a fix for the same reason it is still broken. There is no easy fix that we are aware of. It seems they partially fixed it. But With the recent adoption of AI coding, choosing a proven web framework with the least amount of non fixable bugs is more of a priority now. Working around a framework bug in react HTML is easy, working around a bug in flutter generated HTML or WASM not so much.

  8. blumberg-git commented on Jul 17, 2026

    @blumberg-git

    no one assigned?? wow

  9. self-assigned this
    on Jul 20, 2026
  10. added
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Jul 20, 2026
  11. flutter-zl commented on Sep 5, 2026

    @flutter-zl
    Contributor

    this issue should be fixed by #190486.

  12. github-actions commented on Sep 19, 2026

    @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.

  13. locked as resolved and limited conversation to collaborators on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)a: text inputEntering text in a text field or keyboard related problemscustomer: castawaycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.found in release: 3.10Found to occur in 3.10found in release: 3.12Found to occur in 3.12found in release: 3.41Found to occur in 3.41frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions