Skip to content

[Accessibility]: Page looses focus after Search modal gets closed #9917

@mxschmitt

Description

@mxschmitt

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

When entering the Search dialog of docusaurus and leaving it afterwards via ESC, the page looses focus and does not re-focus the search input box from before.

Relates microsoft/playwright.dev#1269.

Reproducible demo

No response

Steps to reproduce

  1. Navigate to https://docusaurus.io/
  2. Press Tab around 14 times, until the focus reaches the Search input box
  3. Press Enter
  4. Press ESC key

Expected behavior

Focus stays at the search input box.

Actual behavior

Focus gets lost.

Your environment

  • Public source code: N/A
  • Public site URL: N/A
  • Docusaurus version used: main
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome 122
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS 14.3

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 executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions