Skip to content

Commit

Permalink
fix(Copy): add aria-live to announce text updates (#5386)
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod authored Feb 20, 2020
1 parent 2ed888f commit 75acb17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react/src/components/Copy/Copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export default function Copy({
onAnimationEnd,
handleAnimationEnd,
])}
{...other}>
{...other}
aria-live="polite"
aria-label={animation ? feedback : other['aria-label']}>
{children}
<span
className={`${prefix}--assistive-text ${prefix}--copy-btn__feedback`}>
Expand Down

0 comments on commit 75acb17

Please sign in to comment.