WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [EXTERNAL] Query on landing the focus

for

From: Mark Magennis
Date: Jul 15, 2019 2:50AM


Hi Venkatesh,

Your thinking seems to be correct. It makes most sense to set focus back to the same point it was at when the alert appeared. It doesn't matter that this is not an interactive item. Focus is often set to non-interactive items such as the main region in a "Jump to main content" link. Make sure you don't show a visible focus indicator on whatever you set focus back to.

However, since the alert wasn't in response to a user action (at least that's what I understand from your description), I can't see how it's possible to know what the screen reader was reading when the alert appeared. Maybe others on the list might know how this could be done. If that's not possible, I'd say the safest thing would be to set focus back to the h1.

Mark

Mark Magennis
Skillsoft | mobile: +353 87 60 60 162
Accessibility Specialist