class sap.ui.core.InvisibleMessage

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/core/InvisibleMessage
Application Component: CA-UI5-COR

The InvisibleMessage provides a way to programmatically expose dynamic content changes in a way that can be announced by screen readers.

Overview

This class is a singleton. The class instance can be retrieved via the static method sap.ui.core.InvisibleMessage.getInstance.

Note: Keep in mind that, according to the ARIA standard, the live regions should be presented and should be empty. Thus, we recommend to instantiate InvisibleMessage via sap.ui.core.InvisibleMessage.getInstance() as early as possible in the application logic, e.g. with the Component initialization, with the main Controller initialization, after Core initialization, etc. Then, you should specify the text that has to be announced by the screen reader and the live region’s mode using the announce method.


Constructor


Methods Overview

Method Description
announce

Inserts the string into the respective span, depending on the mode provided.

sap.ui.core.InvisibleMessage.extend

Creates a new subclass of class sap.ui.core.InvisibleMessage with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.base.ManagedObject.extend.

sap.ui.core.InvisibleMessage.getInstance

Returns the instance of the class.

sap.ui.core.InvisibleMessage.getMetadata

Returns a metadata object for class sap.ui.core.InvisibleMessage.

announce

Inserts the string into the respective span, depending on the mode provided.

Param Type DefaultValue Description
sText string

String to be announced by the screen reader.

sMode sap.ui.core.InvisibleMessageMode

The mode to be inserted in the aria-live attribute.

sap.ui.core.InvisibleMessage.extend

Creates a new subclass of class sap.ui.core.InvisibleMessage with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.base.ManagedObject.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.core.InvisibleMessage.getInstance

Returns the instance of the class.

sap.ui.core.InvisibleMessage.getMetadata

Returns a metadata object for class sap.ui.core.InvisibleMessage.