Interview practice question
Building an accessible modal in React
Frontend Engineering · React · Intermediate
How would you implement an accessible modal dialog in React?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Native dialog element or accessible library.
- Portal to body if custom.
- Focus trap, initial focus, return focus.
- Escape closes; aria-modal, labelled.
- Prevent background scroll.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.