Skip to content

Commit 4fdc503

Browse files
role alert has an implicit aria-live value of assertive (#863)
Elements with the role alert have an implicit aria-live value of assertive, and an implicit aria-atomic value of true. https://www.w3.org/TR/wai-aria-1.2/#alert And I added a <button type="button"> as <button> is a submit and can cause form submissions when it is a descendant of <form> elements
1 parent 3d98b9f commit 4fdc503

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • guides/accessibility/accessibility

guides/accessibility/accessibility/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ Live regions let assistive tech announce content updates that aren't tied to nav
332332

333333
```html
334334
<!-- Session Timeout Warning with controls -->
335-
<div role="alert" aria-live="assertive" class="timeout-warning">
335+
<div role="alert" class="timeout-warning">
336336
Your session will expire in 2 minutes.
337-
<button onclick="extendSession()">Extend Session</button>
337+
<button type="button" onclick="extendSession()">Extend Session</button>
338338
</div>
339339
```
340340

0 commit comments

Comments
 (0)