@@ -0,0 +1,15 @@
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
const source = readFileSync('src/CountdownPanel.vue', 'utf8')
|
||||
|
||||
describe('countdown modal accessibility', () => {
|
||||
it('names the dialog and supports focus and Escape close', () => {
|
||||
expect(source).toContain('aria-labelledby="countdown-dialog-title"')
|
||||
expect(source).toContain('id="countdown-dialog-title"')
|
||||
expect(source).toContain('@keydown.esc="closeDialog"')
|
||||
expect(source).toContain('ref="titleInput"')
|
||||
expect(source).toContain('titleInput.value?.focus()')
|
||||
expect(source).toContain(':inert="open"')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user