Skip to content

Keyboard focus is lost when exiting the dropdown #8697

@kagankan

Description

@kagankan

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Thank you, maintainers and contributors, for this useful framework!


Bug: Keyboard focus is lost when exiting the dropdown (e.g. language switcher).

Docusaurus.-.Dropdown.Keyboard.Focus.Bug.cut.mp4

Reproducible demo

https://stackblitz.com/edit/github-segjfa?file=docusaurus.config.js

Steps to reproduce

  1. Press Tab, Tab, ... to focus language switcher.
  2. Press Enter to open dropdown.
  3. Press Tab, Tab, ... to move focus.
  4. When exiting the dropdown, focus is lost.

Expected behavior

Focus moves to theme switcher.

Actual behavior

Focus is lost.

Your environment

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: a11yRelated to accessibility concerns of the default theme

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions