Skip to content

Focus should be restored to original position after closing modal #279

Open
@benknight

Description

@benknight

Summary:

For good keyboard a11y, when the user closes the modal, focus should be restored to whatever element was focused before they triggered the modal.

Steps to reproduce:

  1. Using keyboard, navigate to "open modal" button on demo page
  2. Hit enter to activate the button and open a modal
  3. Use keyboard focus to close modal

Expected behavior:

Focus should be restored to the button that opened the modal in step one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions