Skip to content

Use WAI Dialog Pattern to improve accessibility - Keyboard Inputs #1

@lutaok

Description

@lutaok

As stated in https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/ the Modal component must respond to specific keyboard inputs to improve accessibility:

  • Tab: Moves focus to the next focusable element contained by the Modal. Focus will never go outside of it.
  • Shift + Tab: Moves focus to the previous focusable element contained by the Modal. Focus will never go outside of it.
  • Escape: Modal closes and focus goes back to the Element that was focused right before opening it

Also, when opening the modal, focus must be set to the first focusable element that can be found within it.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions