Accessibility · Senior · Question 21 of 75
What should happen if the element that opened a dialog is gone when the dialog closes?
- 1Keep the dialog open until the element comes back
- 2Let focus fall to
body, because that's the default - 3Move focus to a sensible nearby element you pick
Show the answer
Correct answer: Move focus to a sensible nearby element you pick
Explanation
If the dialog's action removed the row, focus the next row or the list heading. Always handle this case explicitly.