facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
55.4k stars 8.31k forks source link

Modal dialog for menu on small viewports #9457

Open srapilly opened 10 months ago

srapilly commented 10 months ago

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

On a small viewport (for example zoom on a desktop) or on mobile, the menu looks like a modal but for assistive technologies, it doesn't work like one.

menu-docusaurus.webm

Tested with Safari and VoiceOver on desktop (It's the same on a mobile screen reader)

We can also see 2 other issues:

Reproducible demo

No response

Steps to reproduce

  1. https://docusaurus.io/
  2. zoom in or reduce the viewport to show the mobile version
  3. Open the menu

Expected behavior

The menu should work like a modal dialog:

To improve that, using the native HTML dialog with a showModal is a good solution. If the native element is not adequate, a small library like a11y-dialog could help

Actual behavior

The menu does not work like a modal dialog:

Your environment

Self-service

bharateshwq commented 2 months ago

Hey, are you still working on this issue?