From 0506f010a3fad7413935ac68851228d0475cd77d Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Wed, 31 Aug 2022 15:45:22 -0500 Subject: [PATCH] docs(toast): fix aria-live usage (#2520) --- docs/api/toast.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/toast.md b/docs/api/toast.md index 2ef9e1be4ab..4de48c86620 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -98,7 +98,7 @@ Toasts are intended to be subtle notifications and are not intended to interrupt `ion-toast` has `aria-live="polite"` and `aria-atomic="true"` set by default. -`aria-live` causes screen readers to announce the content of the toast when it is presented. However, since the attribute is set to `'polite'`, screen readers generally do not interrupt the current task. Developers can customize this behavior by using the `htmlAttributes` property to set `aria-live` to `'assertive'`. This will cause screen readers to immediately notify the user when a toast is presented, potentially interrupting any previous updates. +`aria-live` causes screen readers to announce the content of the toast when it is updated. However, since the attribute is set to `'polite'`, screen readers generally do not interrupt the current task. Developers can customize this behavior by using the `htmlAttributes` property to set `aria-live` to `'assertive'`. This will cause screen readers to immediately notify the user when a toast is updated, potentially interrupting any previous updates. `aria-atomic="true"` is set to ensure that the entire toast is announced as a single unit. This is useful when dynamically updating the content of the toast as it prevents screen readers from announcing only the content that has changed. @@ -497,4 +497,4 @@ export default defineComponent({ ## Slots - \ No newline at end of file +