fix(a11y): add initial focus to play button in speaking modal (#66419)

This commit is contained in:
Huyen Nguyen
2026-03-24 17:44:54 +07:00
committed by GitHub
parent ca05f09f30
commit a0f37ae009
2 changed files with 13 additions and 6 deletions
@@ -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']