spAriaUtil - Client

You can show messages on a screen reader. The spAriaUtil service is an angular service included as part of the Service Portal angular application. The spAriaUtil service is available in the client script block of Service Portal widgets.

spAriaUtil - sendLiveMessage(String message)

Announce a message to a screen reader.

The sendLiveMessage() method injects text into an aria-live region on the page. The default setting for an aria-live region is assertive, which means that messages are announced immediately. This can annoy and confuse users if used too frequently.

Table 1. Parameters
Name Type Description
message String The message to be shown.
Table 2. Returns
Type Description
function(spAriaUtil) {
  /* widget controller */

  spAriaUtil.sendLiveMessage('Hello world!');