Build an Accessible Modal
Talk it through out loud with your AI coach.
The problem
- hard
- Pro
You're building a confirmation dialog that appears over the page. Keyboard users currently tab behind it, and screen reader users don't know it opened. Explain how you'd make the dialog accessible from opening to closing.
What a strong answer covers
- Where focus goes when the dialog opens, and where it goes back to on close.
- Keeping keyboard users inside the dialog and the page behind out of reach.
- How the dialog is announced and named for screen readers.
- Ways to close it, and what happens to the page behind while it's open.
Common mistake: Making the dialog look modal while focus and screen readers can still wander into the page behind it.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud