Skip to content

Commit

Permalink
Merge pull request #75 from Cognigy/feature/73988-accessibile-button-…
Browse files Browse the repository at this point in the history
…name-for-audio-play

Add accessible name to audio play button
  • Loading branch information
sushmi21 authored Aug 8, 2024
2 parents bac08db + f0e18fc commit 1fb75d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/messages/Audio/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ const Controls: FC<ControlsProps> = props => {
</div>

<div className="buttons">
<button className={classes.playButton} onClick={togglePlayAndPause}>
<button
className={classes.playButton}
onClick={togglePlayAndPause}
aria-label={playing ? "Pause audio" : "Play audio"}
>
{playing ? <AudioPause /> : <AudioPlay />}
</button>
</div>
Expand Down

0 comments on commit 1fb75d7

Please sign in to comment.