--- url: "https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA18" titulek: "ARIA18: Using aria-alertdialog to Identify Errors | WAI | W3C" h1: "Technique ARIA18:Using aria-alertdialog to Identify Errors" popis: "" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 06:29:18" znaku: 3144 slov: 424 kodovani: "utf-8" sha256: "0f8d46310dde8d80cecbc4313d1dae26446500b5449dd1a42e05cb61ea603b42" --- # Technique ARIA18:Using `aria-alertdialog` to Identify Errors ## About this Technique This technique relates to: - [3.3.1 Error Identification](https://www.w3.org/WAI/WCAG22/Understanding/error-identification) ( **Sufficient** ) - [3.3.3 Error Suggestion](https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion) ( **Sufficient** ) - [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages) ( **Advisory** ) This technique applies to technologies that support [Accessible Rich Internet Applications (WAI-ARIA)](https://www.w3.org/TR/wai-aria/). Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are **not required** to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See [About WCAG Techniques](https://www.w3.org/WAI/WCAG22/Techniques/about). ## Description The purpose of this technique is to alert people that an input error has occurred. Using `role="alertdialog"` creates a notification. This notification should be modal with the following characteristics: - `aria-label` or `aria-labelledby` attribute gives the alertdialog an accessible name. - The `alertdialog` contains at least one focusable element, and the focus should move to that element when the `alertdialog` opens. - The tab order is constrained within the `alertdialog` whilst it is open. - When the `alertdialog` is dismissed, the focus moves back to the position it had before the `alertdialog` opened, if possible. ## Examples ### Example 1: Alert dialog This example shows how a notification using `role="alertdialog"` can be used to notify someone they have entered invalid information. ```

Error

Employee's Birth Date is after their hire date. Please verify the birth date and hire date.

``` Working example: [Using `aria-alertdialog` to Identify Errors](../../working-examples/aria-alertdialog-identify-errors/). ## Related Resources *No endorsement implied.* - [WAI-ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/) ## Tests ### Procedure 1. Trigger the error that causes the `alertdialog` to appear. 2. Determine that the `alertdialog` contains at least one focusable element, and the focus moves to that element when the `alertdialog` opens. 3. If using a non-native `dialog` element: determine that the tab order is constrained within the `alertdialog` while it is open, and when the `alertdialog` is dismissed, the focus moves back to the position it had before the `alertdialog` opened, if possible. 4. Examine the element with `alertdialog` applied. 5. Determine that either the `aria-label` or `aria-labelledby` attribute has been correctly used to give the alertdialog an accessible name. 6. Determine that the contents of the `alertdialog` identifies the input error. 7. Determine whether contents of the `alertdialog` suggests how to fix the error. ### Expected Results - Checks #2, #3, #5 and #6 are true. For Success Criterion 3.3.3, check #7 is also true. Back to Top