Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Semantics]: Control over TextField's a11y announcer on maxLength property #108728

Open
838 opened this issue Aug 1, 2022 · 2 comments
Open

[Semantics]: Control over TextField's a11y announcer on maxLength property #108728

838 opened this issue Aug 1, 2022 · 2 comments
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: internationalization Supporting other languages or locales. (aka i18n) a: text input Entering text in a text field or keyboard related problems c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. team-design Owned by Design Languages team triaged-design Triaged by Design Languages team

Comments

@838
Copy link
Contributor

838 commented Aug 1, 2022

Use case

On TextField widget when setting the maxLength property the screen readers will announce how many character is left on every input, which is a bit annoying for the end user when typing a long text.

demo.MP4

Proposal

Could this be possible to add a option to the TextField either to disable the live announcer or to change the frequency of the announcing?

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. engine flutter/engine repository. See also e: labels. a: internationalization Supporting other languages or locales. (aka i18n) c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Aug 1, 2022
@danagbemava-nc
Copy link
Member

danagbemava-nc commented Aug 1, 2022

The announcement of the remaining characters is also done on android

sample code
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
     home: Screen(title: 'Title'),
    );
  }
}

class Screen extends StatelessWidget {
  const Screen({
    required this.title,
    this.addQueryParams = false,
    Key? key,
  }) : super(key: key);

  final String title;

  final bool addQueryParams;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: const Center(
        child: TextField(
          maxLength: 2000,
          maxLines: 4,
          autofocus: true,
          maxLengthEnforcement: MaxLengthEnforcement.enforced,
        ),
      ),
    );
  }
}

@chinmaygarde
Copy link
Member

This is controlled by the framework. Removing the engine tag.

@chinmaygarde chinmaygarde removed the engine flutter/engine repository. See also e: labels. label Aug 1, 2022
@goderbauer goderbauer added f: material design flutter/packages/flutter/material repository. a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) labels Aug 2, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-design Owned by Design Languages team triaged-design Triaged by Design Languages team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: internationalization Supporting other languages or locales. (aka i18n) a: text input Entering text in a text field or keyboard related problems c: proposal A detailed proposal for a change to Flutter f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. team-design Owned by Design Languages team triaged-design Triaged by Design Languages team
Projects
None yet
Development

No branches or pull requests

5 participants