Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Focus & Modal #229

Open
Open
@akiarostami

Description

@akiarostami

First of all, wonderful set of components! Thank you for creating these.

There is an issue with the Modal component. Let's say we have a button that opens a Modal (e.g. «Open ConfirmationModal» button in your Modaldocumentation page). If the user uses keyboard / tab to move focus to that button, the user then can keep pressing «space» and it would keep opening new Modals.

Modals in general should save the last focused element, and then use a focus trap to prevent users from changing focus. In order to create a Focus Trap, you can simply bracket the dialog node with two invisible, focusable nodes (<div tablindex="0" />). While this dialog is open, we use these to make sure that focus never leaves the document even if dialogNode is the first or last node.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp