Notification methods - Fluid Topics - Latest

Fluid Topics Designer Guide

Category
Reference Guides
Audience
public
Version
Latest

FluidTopicsNotificationService allows designers to notify users of an action.

The three following methods create the following notifications:

  • info()
  • warn()
  • error()

Three notification banners stacked vertically. The top banner is blue and reads 'This is an information notification' with a circular 'X' icon on the right. The middle banner is yellow with text 'This is a warning notification' and a similar 'X' icon. The bottom banner is orange and states 'This is an error notification' with the same 'X' icon on the right.

For example:

FluidTopicsNotificationService.info("This is an information notification!")
FluidTopicsNotificationService.warn("This is a warning notification!")
FluidTopicsNotificationService.error("This is an error notification!")

The aria() method creates a notification for screen readers. The notification has an aria-live="polite" attribute: the screen reader reads the message when the user finishes their current activity, without interrupting them.

For example:

FluidTopicsNotificationService.aria("This is an ARIA notification!")