Skip to content

Modal keyboard interaction #561

@jgiardino

Description

@jgiardino

The modal component should follow wai-aria authoring practices recommendations for keyboard interaction, specifically with regard to initial focus and keyboard support.

Several resources related to react and modals were included in #815.

Guidelines are available in the wai-aria authoring practices for Dialog as well as in the wai-aria Modal Dialog Example.

The keyboard interaction they describe seems pretty straightforward.

The guidelines for initial focus get a little hairy depending on the size and contents of the modal. They go into great detail on this in the Modal Dialog Example, under Accessibility Features, list item 2. Basically, the idea is to avoid having focus placed on an element that is off the screen which would force the first contents to scroll out of view. I’m not sure that there’s a smart way to handle this, so the best alternative might be to let the consumer identify which element will receive focus.

Any feedback and suggestions for this interaction are appreciated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions