ARIA alert
Role Example
- - Note: - This page requires updates per issue 185. - Please provide any additional feedback in this issue. -
+Alert Example
-This example shows a simple alert after you click the button.
++ This example shows a simple alert after you click the button. + It’s implemented according to the design pattern for alert. +
-More information on alert pattern
+Example
+ +
+
-
-
-
+
-
+
+
+
+
+
+
+
+
+
-
+
Accessibility Feature
- --
+
role=alert
identifies an element as an alert which is a specialized form of thestatus
role.
-
Accessibility Features
+Keyboard Support
+ + +Keyboard Support
No keyboard interaction needed.
+ARIA Roles, Properties and States
- -Role | -Property/State | -Usage | +Role | +Attribute | +Element | +Usage |
---|---|---|---|---|---|---|
alert | +alert |
+
Identify element as Alert widget
@@ -63,29 +70,54 @@ ARIA Roles, Properties and States | ||||
- | aria-live with implicit value of assertive |
- - Announces alert when it is displayed. - | +aria-live with implicit value of assertive |
+ + | Announces alert when it is displayed. | |
- | aria-atomic with implicit value of true |
+ aria-atomic with implicit value of true |
+ Tells assistive technologies to announce all content. |
Source Code
- +Javascript and CSS Source Code
+HTML Source Code
+ + + ++<script type="text/template" id="alert-template"> + <div role="alert"> + <p>Hej, hello, ciao, こんにちは, 안녕</p> + </div> +</script> + +<button id="alert-trigger">Trigger an alert</button> ++