Skip to content

Focus lock not working with VoiceOver/Safari on MacOS #879

Open
@aappoalander

Description

@aappoalander

Summary:

It seems to be possible to escape the focus lock with VoiceOver and Safari on MacOS if Quick Nav is turned off. Navigating with left or right arrow key (without VoiceOver modifier key) allows the screen reader cursor to escape the modal. Once a focusable element outside the modal is reached, focus escapes and it is possible to navigate the underlying page with e.g. tab-key.

Steps to reproduce:

  1. Open Safari on MacOS
  2. Navigate to https://github.com/reactjs/react-modal#demos / Minimal example
  3. Turn on VoiceOver, turn off Quick Nav (left+right arrow)
  4. Trigger / open the modal
  5. Navigate with left arrow key (without modifier) until cursor reaches the trigger button outside the modal

Expected behavior:

Cursor should stay inside the modal like here (https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/dialog.html). Focus should not escape.

Link to example of issue:

https://codepen.io/claydiffrient/pen/KNxgav

Additional notes:

This is pontentially a MacOS/Safari/VoiceOver bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions