Skip to content

[A11y] TextField incorrect semantics ordering when there are prefix or suffix #148248

Closed

Description

@chunhtai

Steps to reproduce

  1. Turn on talkback and traverse the textfield

Expected results

It should focus
abc -> @gmail.com -> xyz -> @gmail.com

Actual results

abc -> xyz -> @gmail.com -> @gmail.com

Code sample

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

void main() {
  runApp(MaterialApp(
    home: HomePage(),
  ));
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Home")),
      body: Center(
        child: Column(
          children: [
            TextField(
              decoration: const InputDecoration(
                labelText: 'Email',
                suffixText: '@gmail.com',
                hintText: 'Enter your email',
              ),
              enabled: false,
              controller: TextEditingController(text: 'abc'),
            ),
            TextField(
              decoration: const InputDecoration(
                labelText: 'Email',
                suffixText: '@gmail.com',
                hintText: 'Enter your email',
              ),
              enabled: false,
              controller: TextEditingController(text: 'xyz'),
            ),
          ],
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output

Activity

  1. self-assigned this
    on May 13, 2024
  2. added
    a: text inputEntering text in a text field or keyboard related problems
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    P1High-priority issues at the top of the work list
    on May 13, 2024
  3. github-actions commented on May 28, 2024

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

  4. locked as resolved and limited conversation to collaborators on May 28, 2024
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 problemsteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions