UNPKG

apex4x

Version:

The Comprehensive ARIA Development Suite

32 lines 1.99 kB
�� Function: alert(stringOrElementNode, boolDoNotRepeat) Description: Fires a system-wide alert for screen reader users using a string message or the textual contents of a DOM element. Returns: String, domElement, or $A object if chained. Note: Designed to function automatically within screen readers that properly support ARIA live regions. The alert method is also prototyped to the String object for alternative usage. Must not be used for non-critical status announcements. Example: // Basic alert of the textual content within a DOM element. $A.alert(sessionTimeoutDialog); // Fire alert while suppressing repeat text var stringVariable = $A.alert("You have 30 seconds to respond.", true); // Using strings var stringVariable = "Processing your payment, please wait.".alert(); // Fire alert while suppressing repeat text stringVariable.alert(true); // Manually clear the internal message queue $A.alert.clear(); // Or stringVariable.alert.clear();