Re: Toast messages with links

On 14/06/2023 10:33, Jan Enning wrote:
> I'm working on toast messages.
> They pop-up on the screen when background tasks are done etc.
> They have aria-live=polite, so far so good.
> 
> But inside the toast content there are links. Those will be read out by 
> the SR. The only thing is the focus does not go to the toasts as the 
> user is filling in a form field while the toast pops-up. Making clicking 
> the links with a SR impossible.
> 
> So my recommendation would be "No links / buttons / interactive 
> elements" inside toast content.
> Would that be a good assumption?

"Pure" toasts just provide a short notification, without any action 
expected to be taken by the user. In those cases, using aria-live is 
appropriate ... it will announce the message, but leave the user's focus 
where it is.

If the expectation is that the user will want/need to action anything 
inside there, it's best not to treat them as classic toasts, but to 
actually move focus to them (and making sure they don't randomly 
disappear from under the user's focus).

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
https://mastodon.social/@patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 14 June 2023 10:33:16 UTC