@a11y/focus-trap

Tab around this demo and notice how your focus is trapped.

Here's some focusable parts outside the trap.

Here's a focus trap with some focusable parts.

Here's some more focusable parts outside the trap.

If you are having troubles with the focus ring being invisible in Safari or Firefox you need to activate the accessibility settings in the browser. Read more here or here if you are interested in learning more.

Github