Keyboard Navigation

The keyboard navigation of the Dialog is always available.

When the Dialog is opened, the initial focus is set on the Dialog element. This approach enables the user to immediately select or navigate between the action buttons by using the Tab and Shift+Tab keys, and to close the Dialog with the Esc button.

You can set the initial focus to one of the action buttons by using the autoFocus attribute.

EscCalls the onClose event handler.
Shift+TabMoves the focus to the previous focusable element.
TabMoves the focus to the next focusable element.

The following example is based on the official accessibility standard for a modal dialog.

View Source
Change Theme:

In this article

Not finding the help you need?