You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/blog/2025-11-aria-live.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,6 +187,17 @@ Consider this example:
187
187
188
188
For most status messages and notifications, `aria-atomic="true"` provides better context.
189
189
190
+
For chat messages, you'd typically use `aria-live="polite"` with `aria-atomic="false"` so each new message is announced individually without interrupting the user:
191
+
192
+
```html
193
+
<!-- Chat messages example -->
194
+
<divaria-live="polite"aria-atomic="false">
195
+
<div>Alice: Hello!</div>
196
+
<div>Bob: Hi there!</div>
197
+
<!-- Only "Bob: Hi there!" gets announced when added -->
198
+
</div>
199
+
```
200
+
190
201
In short:
191
202
-**`aria-live`** defines *when* to speak (or not at all with `off`)
0 commit comments