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


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Vemaarapu Venkatesh
Sent: 15 July 2019 09:31
To: <EMAIL REMOVED>
Subject: [EXTERNAL] [WebAIM] Query on landing the focus

Hello everyone, Greetings!

I have a web page with static text alone and only one heading (h1) at the
top. While reading the page using screen reader, an alert dialog pops up
shifting the focus there to confirm it. Once confirming it where I should
expect the focus?
If the focus resets to top of the page, that may annoy users as they must
navigate all the way again.
To set the focus back to same area it is not the interactive item instead
the dialog emerges while reading a paragraph. Is there any mechanism to set
the focus back to same line from where user stops reading?

Thanks for your insights in advance.

Thanks,
Venkatesh