Skip to content

a11y: disabled textfield not announced as textfield #37162

Closed

Description

@goderbauer
TextField(
   enabled: false,
),

On Android with TalkBack enabled this should be announced as a disabled editbox. It is currently not announced at all. (It looks like the TextField flag is missing from the semantics tree when the TextField is disabled).

I haven't tested on iOS (and I am not 100% of what the native behavior is there), but I assume it's also broken there.

/cc @dnfield for a11y
/cc @chunhtai @justinmc for TextFields

Activity

  1. 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)
    on Jul 29, 2019
  2. goderbauer commented on Jul 29, 2019

    @goderbauer
    MemberAuthor

    TextField wraps an EditableText within an IgnorePointer:

    RenderIgnorePointer has the following TODO:

    // TODO(ianh): figure out a way to still include labels and flags in
    // descendants, just make them non-interactive, even when
    // _effectiveIgnoringSemantics is true
    @override
    void visitChildrenForSemantics(RenderObjectVisitor visitor) {
    if (child != null && !_effectiveIgnoringSemantics)
    visitor(child);
    }

    Which is probably to blame here. When the textfield is disabled, IgnorePointer is enabled and all semantics from EditableText (like isTextField, etc) is no longer included in the tree.

  3. justinmc commented on Jul 29, 2019

    @justinmc
    Contributor

    I tried on iOS with VoiceOver enabled and you're right that it's also broken there. For an enabled CupertinoTextField, it's announced correctly as "text field", and for a disabled CupertinoTextField, it's not announced at all.

  4. self-assigned this
    on Jul 29, 2019
  5. chunhtai commented on Jul 29, 2019

    @chunhtai
    Contributor

    Hi @justinmc @goderbauer and probably @Hixie,
    Can you take a look at my prototype pr?
    #37199

  6. zoeyfan commented on Jan 3, 2020

    @zoeyfan

    Is this still being actively worked on? If we have addressed it, please close the bug.

  7. added this to the milestone on Jan 3, 2020
  8. chunhtai commented on Jan 4, 2020

    @chunhtai
    Contributor

    No, I have a draft up, but I has been distracted due to other higher priority issues. This is currently sitting in my back log, and i don't think i can get to it in the near future. Has the priority of this issue shifted?

  9. zoeyfan commented on Jan 10, 2020

    @zoeyfan

    @chunhtai no change on priority. I am simply triaging old issues and noticed this one.

  10. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  11. removed their assignment
    on Jun 5, 2020
  12. 5 remaining items

  13. TahaTesser commented on Jul 16, 2020

    @TahaTesser
    Contributor
    flutter doctor -v
    [✓] Flutter (Channel dev, 1.20.0-7.1.pre, on Mac OS X 10.15.6 19G73, locale
        en-GB)
        • Flutter version 1.20.0-7.1.pre at /Users/taha/Code/flutter_dev
        • Framework revision 7736f3bc90 (6 days ago), 2020-07-10 16:33:05 -0700
        • Engine revision d48085141c
        • Dart version 2.9.0 (build 2.9.0-21.2.beta)
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version
        30.0.0)
        • Android SDK at /Users/taha/Code/sdk
        • Platform android-30, build-tools 30.0.0
        • ANDROID_HOME = /Users/taha/Code/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.6)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.6, Build version 11E708
        • CocoaPods version 1.9.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google
          Chrome
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 47.1.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build
          1.8.0_242-release-1644-b3-6222593)
    
    [✓] VS Code (version 1.47.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.12.2
    
    [✓] Connected device (5 available)
        • SM M305F (mobile)      • 32003c30dc19668f          • android-arm64  •
          Android 10 (API 29)
        • Taha’s iPhone (mobile) • 00008020-001059882212002E • ios            •
          iOS 13.6
        • macOS (desktop)        • macos                     • darwin-x64     •
          Mac OS X 10.15.6 19G73
        • Web Server (web)       • web-server                • web-javascript •
          Flutter Tools
        • Chrome (web)           • chrome                    • web-javascript •
          Google Chrome 83.0.4103.116
    
    • No issues found!
    
  14. removed this from the milestone on Aug 17, 2020
  15. darshankawar commented on Nov 9, 2022

    @darshankawar
    Member

    Verified this on latest versions and confirmed the behavior is still replicable. Talkback / voiceover doesn't announce / read disabled textfield.

    stable, master flutter doctor -v
    [✓] Flutter (Channel stable, 3.3.7, on macOS 12.2.1 21D62 darwin-x64, locale
        en-GB)
        • Flutter version 3.3.7 on channel stable at
          /Users/dhs/documents/fluttersdk/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision e99c9c7cd9 (2 days ago), 2022-11-01 16:59:00 -0700
        • Engine revision 857bd6b74c
        • Dart version 2.18.4
        • DevTools version 2.15.0
    
    [!] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        ! Flutter recommends a minimum Xcode version of 13.
          Download the latest version or update via the Mac App Store.
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] VS Code (version 1.62.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
          ios            • iOS 14.4.1 18D61
        • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
          ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
        • macOS (desktop)            • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)               • chrome                                   •
          web-javascript • Google Chrome 98.0.4758.80
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    
    [!] Flutter (Channel master, 3.5.0-12.0.pre.175, on macOS 12.2.1 21D62
        darwin-x64, locale en-GB)
        • Flutter version 3.5.0-12.0.pre.175 on channel master at
          /Users/dhs/documents/fluttersdk/flutter
        ! Warning: `flutter` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
          your current Flutter SDK checkout at
          /Users/dhs/documents/fluttersdk/flutter. Consider adding
          /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
        ! Warning: `dart` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
          current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
          Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
          of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 92f10ed712 (3 hours ago), 2022-11-08 17:57:52 -0800
        • Engine revision e7d7edab98
        • Dart version 2.19.0 (build 2.19.0-374.0.dev)
        • DevTools version 2.19.0
        • If those were intentional, you can disregard the above warnings; however
          it is recommended to use "git" directly to perform update checks and
          upgrades.
        
    [!] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        ! Flutter recommends a minimum Xcode version of 13.
          Download the latest version or update via the Mac App Store.
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] VS Code (version 1.62.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
          ios            • iOS 14.4.1 18D61
        • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
          ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
        • macOS (desktop)            • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)               • chrome                                   •
          web-javascript • Google Chrome 98.0.4758.80
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    
    
    
    
  16. kumar3863 commented on Dec 23, 2022

    @kumar3863

    Verified this on the latest versions and it is replicable but not fixed yet, for android it read disabled, and for iOS, it read dimmed not with the text field or edit box.

  17. self-assigned this
    on Feb 27, 2023
  18. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 10, 2023
  19. github-actions commented on Apr 24, 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.

  20. locked as resolved and limited conversation to collaborators on Apr 24, 2023
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 problemsc: API breakBackwards-incompatible API changesfound in release: 3.3Found to occur in 3.3found in release: 3.5Found to occur in 3.5frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: 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