Example 3: dialogs
This page contains four dialogs. When each one opens, focus should move to the dialog's heading. When it closes with Escape, focus should return to the button that opened it. Three work correctly. One is deliberately broken.
Working dialogs
Deliberately broken
This dialog opens correctly, but when it closes, focus is dropped completely. It falls back to the page itself, so keyboard users are left with no visible focus and no idea where they are.