Skip to content

[Web] Accessibility focus ring disappears when it gets enabled in Chrome. #118723

Open

Description

@nbayati

Internal: b/292548400

Accessibility focus ring doesn't show up if there is no element on the page with autofocus set. (related issue: #118651) The used gets stuck, and they have to go outside of the web content and come back in order to get the focus ring to appear.

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 first element in the page gets focused.

Actual results: The accessibility ring doesn't show up. The user 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: () {},
                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. added
    platform-webWeb applications specifically
    a: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)
    on Jan 18, 2023
  2. self-assigned this
    on Jan 19, 2023
  3. negarelion commented on Jan 21, 2023

    @negarelion

    As my last contribution here:) :
    The problem is that the placeholder element gets removed from the DOM before the semantic tree gets populated. It can be solved by setting a timer before calling dispose() here,

  4. yjbanov commented on Feb 7, 2023

    @yjbanov
    Contributor

    Thank you so much for sharing the solution, @negarelion!

  5. added
    P1High-priority issues at the top of the work list
    on Feb 7, 2023
  6. self-assigned this
    on May 22, 2023
  7. flutter-triage-bot commented on Oct 9, 2023

    @flutter-triage-bot

    This issue is assigned to @yjbanov 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!

  8. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Oct 9, 2023
  9. flutter-triage-bot commented on Dec 28, 2023

    @flutter-triage-bot

    This issue was assigned to @yjbanov but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

  10. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Dec 28, 2023
  11. added
    P2Important issues not at the top of the work list
    triaged-webTriaged by Web platform team
    and removed
    P1High-priority issues at the top of the work list
    on Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)customer: huggsy (g3)f: focusFocus traversal, gaining or losing focusplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions