Toast! Is it accessible?

What is a toast

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


The toast accessibility problems


  • Enough time: The toast displays the message only for few seconds. This in many cases will not be enough for the users to read the message before it disappears. As I do the research on Android the maximum length for displaying a toast is 3.5 seconds. Author can set toast.LENGTH_SHORT and toast.LENGTH_LONG for the duration attribute.
  • Reading the message: For users who depend on screen reading technologies, the toast messages must be read out as they appear. If they are not read out the important message shared through the toast will not be conveyed to them. Of course they don’t even know that the toast message has displayed and disappeared.
  • On page load: If the toast messages are displayed on page load it might be disorienting for certain users.
  • Consistent identification: As the Android developer guide a toast message can be  displayed on any place on the screen. Top, bottom, left, right or even at a certain position on the screen. If toast messages available on different screen appears on different positions it causes difficulty for the users to locate it.
  • Automatic time out: The toasts as said in the definition disappears without user interaction. People who want to read it for longer time and who want to dismiss the toast by themselves may not able to do it accurately.

Suggestions to make toast 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 found few alternates that in extending the duration by making it reappear immediately after it disappears even without user notice. Here is a sample implementation on cindypotvin’s 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.
  • 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.
  • Other suggestions: For different types of messages use different ways of identification. Eg: It might not be a good practice to have the same appearance for error message and the help message.  Contrasting colors for the message and background, not only sensory characteristics to convey the messages,  focus indicators etc.

Reference links (External websites)

How to show a Toast for a specific duration in Android

Leave a Reply