Announces pausing and resuming the hero slide show
The pause button only changed its name, which screen readers often do not read for the focused button. The live region now also says when the slide show is paused or plays again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,9 @@ describe('Hero', () => {
|
||||
|
||||
await userEvent.click(pause);
|
||||
expect(pause).toHaveAccessibleName('Diavoorstelling afspelen');
|
||||
expect(screen.getByTestId('hero-announcement')).toHaveTextContent(
|
||||
'Diavoorstelling gepauzeerd',
|
||||
);
|
||||
expect(progress()).toHaveAttribute('data-state', 'paused');
|
||||
|
||||
// Blijft gepauzeerd als de muis de hero verlaat
|
||||
@@ -105,6 +108,9 @@ describe('Hero', () => {
|
||||
|
||||
await userEvent.click(pause);
|
||||
expect(pause).toHaveAccessibleName('Diavoorstelling pauzeren');
|
||||
expect(screen.getByTestId('hero-announcement')).toHaveTextContent(
|
||||
'Diavoorstelling speelt weer af',
|
||||
);
|
||||
expect(progress()).toHaveAttribute('data-state', 'running');
|
||||
expect(await axeResults(container)).toHaveNoViolations();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user