Modal Focus Trap (Accessibility)

JavaScript Hard 4 views
Back to Questions

Problem Description

You have #modal with focusable elements and class show means open. When open, trap Tab/Shift+Tab inside modal. ESC closes.

Input Format

No input.

Output Format

No output (DOM change).

Constraints

Assume #modal exists and close button has id close.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next