mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(a11y): add initial focus to play button in speaking modal (#66419)
This commit is contained in:
@@ -47,11 +47,11 @@ test.describe('Multiple Choice Question Challenge - With Speaking Modal', () =>
|
||||
|
||||
await expect(page.getByRole('dialog')).toBeVisible();
|
||||
|
||||
await expect(
|
||||
page.getByRole('button', {
|
||||
name: translations['speaking-modal']['play']
|
||||
})
|
||||
).toBeVisible();
|
||||
const playButton = page.getByRole('button', {
|
||||
name: translations['speaking-modal']['play']
|
||||
});
|
||||
await expect(playButton).toBeVisible();
|
||||
await expect(playButton).toBeFocused(); // The button is focused by default
|
||||
await expect(
|
||||
page.getByRole('button', {
|
||||
name: translations['speaking-modal']['record']
|
||||
|
||||
Reference in New Issue
Block a user