Skip to content

[Web] button with autofocus doesn't gain accessibility focus automatically #118651

Closed
flutter-team-archive/engine
#38958

Description

@nbayati

Steps to Reproduce

  1. Run sample code on Chrome on desktop
  2. Enable accessibility
  3. Navigate to the next element using VoiceOver shortcuts.

Expected results: The element with autofocus needs to gain focus

Actual results: Can't navigate using VoiceOver unless exit web content and come back.

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

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

  @override
  State<StatefulWidget> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: Center(
          child: Column(
            children: [
              TextButton(
                onPressed: () {},
                autofocus: true,
                child: const Text('Text 1'),
              ),
              TextButton(
                onPressed: () {},
                child: const Text('Text 2'),
              ),
              TextButton(
                onPressed: () {},
                child: const Text('Text 3'),
              ),
              TextButton(
                onPressed: () {},
                child: const Text('Text 4'),
              ),
              TextButton(
                onPressed: () {},
                child: const Text('Text 5'),
              ),
              TextButton(
                onPressed: () {},
                child: const Text('Text 6'),
              ),
            ],
          ),
        ),
      );
}

Activity

  1. self-assigned this
    on Jan 17, 2023
  2. added
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    platform-webWeb applications specifically
    P1High-priority issues at the top of the work list
    on Jan 18, 2023
  3. github-actions commented on Mar 4, 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.

  4. locked as resolved and limited conversation to collaborators on Mar 4, 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)customer: huggsy (g3)platform-webWeb applications specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions