Skip to content

Commit

Permalink
chore: update toasts to be assertive (#4877)
Browse files Browse the repository at this point in the history
* chore: update toasts to be assertive

* Create rotten-terms-own.md
  • Loading branch information
thaddmt authored Jan 3, 2024
1 parent 8d41213 commit 94d05cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rotten-terms-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@aws-amplify/ui-react-liveness": patch
---

chore: update toasts to be assertive
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface HintProps {
const defaultToast = (text: string, isInitial = false) => {
return (
<Toast size="large" variation="primary" isInitial={isInitial}>
<View aria-live="polite" aria-label={text}>
<View aria-live="assertive" aria-label={text}>
{text}
</View>
</Toast>
Expand Down Expand Up @@ -156,7 +156,7 @@ export const Hint: React.FC<HintProps> = ({ hintDisplayText }) => {
faceMatchState === FaceMatchState.TOO_CLOSE ? 'error' : 'primary'
}
>
<View aria-live="polite" aria-label={resultHintString}>
<View aria-live="assertive" aria-label={resultHintString}>
{resultHintString}
</View>
</Toast>
Expand Down

0 comments on commit 94d05cb

Please sign in to comment.