WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Trapping focus in an alert

for

From: Steve Green
Date: Apr 5, 2018 12:12PM


I invariably advise our clients that they should use a modal dialog i.e. trap the focus as you describe. It's particularly good for people using keyboard navigation or screen readers because it prevents them from accidentally navigating back into the page and then finding it difficult to locate the buttons again.

I suppose it's possible that there are some applications where it is critical that users do not get interrupted during a process (other than hearing or seeing the alert) but I can't think of any.

Steve Green
Managing Director
Test Partners Ltd