Skip to content

CupertinoTextField clear button accessibility #123107

Closed

Description

@deakjahn

Steps to Reproduce

  1. Place a CupertinoTextFieldwith clearButtonMode: OverlayVisibilityMode.always.
  2. Use VoiceOver on an iOS device or turn on the showSemanticsDebugger in the Flutter app.

Expected results:

A semantic label (preferably a customizable one) for the clear button.

Actual results:

No semantic label for the clear button.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Mar 21, 2023
  2. exaby73 commented on Mar 21, 2023

    @exaby73
    Member

    Hello @deakjahn. Thank you for filing this issue. Can you please provide the following information?

    Please provide the information in the form of text. See how to make collapsible sections with Markdown here.

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 21, 2023
  4. deakjahn commented on Mar 21, 2023

    @deakjahn
    ContributorAuthor

    cupertino_clear_a11y.zip

    When run, note that the text field itself has a semantic label but the clear button does not.

    Doc
    E:\Android\flutter\bin\flutter.bat doctor --verbose
    [√] Flutter (Channel stable, 3.7.7, on Microsoft Windows [Version 10.0.22621.1413], locale en-US)
        • Flutter version 3.7.7 on channel stable at E:\Android\flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 2ad6cd72c0 (13 days ago), 2023-03-08 09:41:59 -0800
        • Engine revision 1837b5be5f
        • Dart version 2.19.4
        • DevTools version 2.20.1
    
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    
    [!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
        • Android SDK at e:\Android\Sdk
        X cmdline-tools component is missing
          Run `path/to/sdkmanager --install "cmdline-tools;latest"`
          See https://developer.android.com/studio/command-line for more details.
        X Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
    
    [X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    
    [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.5.2)
        • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
        • Visual Studio Community 2022 version 17.5.33502.453
        • Windows 10 SDK version 10.0.22621.0
    
    [√] Android Studio (version 2022.1)
        • Android Studio at C:\Program Files\Android\Android Studio
        • 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.15+0-b2043.56-9505619)
    
    [√] Connected device (3 available)
        • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 13 (API 33) (emulator)
        • Windows (desktop)            • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.1413]
        • Edge (web)                   • edge          • web-javascript • Microsoft Edge 111.0.1661.44
    
    [√] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 2 categories.
    Process finished with exit code 0
    
  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 21, 2023
  6. exaby73 commented on Mar 22, 2023

    @exaby73
    Member

    Triage report

    Thank you. I can reproduce this issue with Master (3.9.0-13.0.pre.29). The clear button is not announced.

    Code Sample
    import 'package:flutter/cupertino.dart';
    import 'package:flutter/material.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          // showSemanticsDebugger: true,
          title: 'Flutter Demo',
          theme: ThemeData(primarySwatch: Colors.blue),
          home: const MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      final String title;
    
      const MyHomePage({super.key, required this.title});
    
      @override
      State<MyHomePage> createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text(widget.title),
          ),
          body: Center(
            child: Semantics(
              label: 'text field',
              child: const CupertinoTextField(
                clearButtonMode: OverlayVisibilityMode.always,
              ),
            ),
          ),
        );
      }
    }
    flutter doctor -v (Master)
    [!] Flutter (Channel master, 3.9.0-13.0.pre.29, on macOS 13.2.1 22D68 darwin-arm64, locale en-US)
        • Flutter version 3.9.0-13.0.pre.29 on channel master at /Users/nabeelparkar/fvm/versions/master
        ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.19.3/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nabeelparkar/fvm/versions/master. Consider adding /Users/nabeelparkar/fvm/versions/master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision c582c80dd6 (2 hours ago), 2023-03-22 03:05:08 -0400
        • Engine revision d0e71494ad
        • Dart version 3.0.0 (build 3.0.0-348.0.dev)
        • DevTools version 2.22.2
        • 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 33.0.0)
        • Android SDK at /Users/nabeelparkar/Library/Android/sdk/
        • Platform android-33, build-tools 33.0.0
        • ANDROID_SDK_ROOT = /Users/nabeelparkar/Library/Android/sdk/
        • Java binary at: /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.2)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14C18
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • CHROME_EXECUTABLE = /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
    
    [✓] Android Studio (version 2022.1)
        • Android Studio at /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386/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.15+0-b2043.56-8887301)
    
    [✓] Android Studio (version 2021.3)
        • Android Studio at /Users/nabeelparkar/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/213.7172.25.2113.9123335/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.13+0-b1751.21-8125866)
    
    [✓] VS Code (version 1.76.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.60.0
    
    [✓] Connected device (3 available)
        • Nabeel’s iPhone (mobile) • 00008101-000E48283A20001E • ios            • iOS 16.3.1 20D67
        • macOS (desktop)          • macos                     • darwin-arm64   • macOS 13.2.1 22D68 darwin-arm64
        • Chrome (web)             • chrome                    • web-javascript • Brave Browser 111.1.49.120
        ! Error: Nabeel’s iPhone is busy: Fetching debug symbols for Nabeel’s iPhone. Xcode will continue when Nabeel’s iPhone is finished. (code -10)
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
  7. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    p: cupertino_uicupertino_ui package in flutter/packages
    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 Mar 22, 2023
  8. added
    a: text inputEntering text in a text field or keyboard related problems
    on Mar 23, 2023
  9. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Aug 10, 2023
  10. flutter-triage-bot commented on Aug 10, 2023

    @flutter-triage-bot

    This issue is assigned to @MitchellGoodwin but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  11. added
    P2Important issues not at the top of the work list
    on Aug 18, 2023
  12. MitchellGoodwin commented on Aug 18, 2023

    @MitchellGoodwin
    Contributor

    This is still being worked on, just making sure the localization on the label is setup correctly.

  13. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Aug 18, 2023
  14. added a commit that references this issue on Dec 15, 2023
    f0051d8
  15. github-actions commented on Dec 29, 2023

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

  16. locked as resolved and limited conversation to collaborators on Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not 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 problemsfound in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cupertino_uicupertino_ui package in flutter/packagesteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions