Toast Message ! Is it accessible?

What is a toast

A toast message is a non modal that appears on the screen for few seconds and auto expires. The toast message shares an alert containing a message to the user. For example: In an email client, once you hit the send button the toast message can be “says Sending the message” and disappears once it is sent. This message is displayed only for few seconds and does not require user interaction.

The toast message accessibility problems

Enough time:
The toast message is displayed only for few seconds. This in many cases will not be enough for the low vision and cognitive challenged users to read the content in the message. As I was researching, on Android the maximum length for displaying a toast message is 3.5 seconds. Author can set toast.LENGTH_SHORT and toast.LENGTH_LONG for the duration attribute.
Reading the message with screen reader:
For users who depend on screen reading technologies, the toast message must be read out as soon as they are displayed. If the screen reader cannot pick the message, users with blindness will not be aware of the message at all.
On page load:
If the toast messages are displayed on page load, it might be disorienting for users with cognitive challenges.
Consistent identification:
As per the Android developer guide, a toast message can beĀ  displayed on any place on the screen using setGravity(int, int, int) method. If toast messages displayed on the application are on different positions on different screens, it causes difficulty for low vision and cognitive challenged users to locate them.
Automatic time out:
The toast messages as said in the definition disappears without user interaction. People who takes too long to read them or those who want to dismiss the toast by themselves may not able to do that.

Suggestions to make toast messages accessible

  • Extend the time limit: Extend the display time limit of the toast messages. Depending on the length of the message the time should be extended. Since the toast.LENGTH_SHORT and toast.LENGTH_LONG are defined by a flag they cannot be changed directly. However, I there are few alternates are available to extend the duration. One of them is by making it reappear immediately after it disappears even without user notice. Here is a sample implementation,cindypotvin blog that shows the toast message until the count down set by the author completes.
  • Reading the toast message: Using ARIA techniques such as role alert and aria-live, the toast messages can be made available for screen reading technologies as soon as they are displayed.
  • Consistent Identification: By default on Android the toast messages are displayed on the bottom of the screen. Authors can set the same to appear on any specific position on the screen. Read Android development guide to know how to do it. Instead of the default behavior if the content author want to display the toast message at a specific position take care that it is displayed at same position on each screen every time it is displayed. Also read WCAG 2.1 3.3.4 consistent identification to know why is it important.
  • Automatic time out: The default behavior of the toast is to time out after a specific duration i.e. 3.5 seconds maximum. Unless the author explicitly provides additional time as discussed in the first point. Automatic time out is not a good practice as far as accessibility is concerned, but the Android developer guide recommends to use notification instead if user interaction is required to dismiss the non modal.

Reference links (External websites)

Related WCAG Success Criteria

Share and Enjoy !

0 0

Published by Maxability

Rakesh Paladugula is a dedicated accessibility enthusiast with wide experience on all forms of digital accessibility. He is a trainer, mentor, advisor, advocate and evangelist. He believes in the modern socio-scientific world digital accessibility is a fundamental right of every citizen including those who have disabilities, low literacy and are from economically backward.

0 replies on “Toast Message ! Is it accessible?”

Contact Us

Maxability Pvt Ltd Flat 360,
Block D2 SLS Signature Appartments,
Kaverappa Layout, Kadubeesanahalli,
Bangalore - 560103.