Exercise 3: Tab Trapping and Keyboard Navigation
In this exercise, you'll learn about keyboard accessibility and how to manage focus in your web applications.
Try using the Tab key to navigate through the form in the modal. Notice how the focus does not stay within the modal:
When you are finished, you should be able to:
- Press Tab to move forward through focusable elements
- Press Shift+Tab to move backward
- The focus will wrap around when you reach the end or beginning
- Press Escape to close the modal