PF/ARIA/BestPractices/AlertDialog

From W3C Wiki
< PF‎ | ARIA‎ | BestPractices


Using the 'alert' and 'alertdialog' Roles

An alert is some information that tells the user about an unexpected, undesirable, or risky condition. The 'alert' and 'alertdialog' values of @role should be used to mark elements delivering information of this nature.

Usage

If the user only needs to be notified of the condition and if you do not want to require an explicit action or acknowledgement of the alert from the user, the use the @role='alert' and leave the focus unchanged. If, however, the user does need to acknowledge the condition or select a next step to address the issue, thaen launch a new window and mark it with @role='alertdialog'. Also save the previous focus so that the user can, when possible, return to the originating window and context after dismissing the alert dialog window.

Notes

An alert may be a popup region or it may be information presented in a way that does not disturb the layout. A typical example of the latter is when space is reserved in a form for an statement about the user input. The error explanation is only filled in or exposed if the user has input invalid data. But the alert is performed in the context of the form control and without disrupting the visual context established by the overall layout. Even in this inline error explanation case, the explanation of the error should be assigned an 'alert' role.