Skip to content

Modal window must capture the keyboard focus #68

Open
@nlopin

Description

@nlopin

When the modal is shown, a user can move focus between its elements using the Tab button. But when we run out of the focusable elements in the modal, the focus moves to the content below.

We must follow WAI ARIA best practices and trap the focus inside the modal.

Codesanbox example shows an app with two inputs — one on the main page and another one in the modal window. When the modal is opened and the focus is on in-modal input, you can still press Shift+Tab to go outside the modal. This is incorrect behaviour, the focus must be trapped inside the modal window

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11yAccessibility related issues and bugs ♿️conversation neededIssues that may need to go to a broader conversation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions