WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Status message that disappears in seconds

for

From: glen walker
Date: Dec 15, 2022 1:02PM


Toast messages can be a challenge to make accessible. Note that SC 2.2.1
contains a "note", which makes that note normative. It says "This success
criterion helps ensure that users can complete tasks without unexpected
changes in content or context that are a result of a time limit."

So to play devil's advocate, does not being able to access the message
about an item being added to the cart prevent the user from completing the
task? I'm not sure it does. That doesn't mean I'm advocating for this
type of behavior but I could see an argument that this does not fail 2.2.1.

Having a link in the toast message to take you to the shopping cart is a
convenience but as noted earlier, there are (hopefully) other ways to
access the cart.

Seeing a message that an item was added to the cart is a nice confirmation
but some users will also notice the cart icon/badge, which typically
includes the number of items in the cart, will increase.

So the toast message isn't the only way to access the cart or to confirm an
item was added.

But again, I'm not saying this issue shouldn't be addressed, even if one
believes it doesn't fail 2.2.1.

There are various things you can do to fix this:
* Don't close the toast message automatically. Give it an x-close button
in the corner. (I suppose that would make it *not* a toast message since
toast messages typically disappear automatically, which is kind of the crux
of the problem.)
* Allow the user to control the timing of the toast message

As a side note, when the toast message appears, it should be announced,
otherwise you'd have a 4.1.3 issue. If the badge on the cart icon also
increases, it'd be nice to include that in the toast announcement, so you
might say something like, "Item added to the cart, 12 items in the cart."