test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import { describe, test, expect } from 'vitest'
|
||||
import SectionCanvas from './SectionCanvas'
|
||||
import type { Section } from '@/lib/state/store'
|
||||
|
||||
describe('SectionCanvas a11y', () => {
|
||||
test('renders dnd-kit live region and instructions', () => {
|
||||
const sections: Section[] = []
|
||||
render(
|
||||
<SectionCanvas
|
||||
sections={sections}
|
||||
onMove={() => {}}
|
||||
onRemove={() => {}}
|
||||
onSelect={() => {}}
|
||||
/>
|
||||
)
|
||||
|
||||
// dnd-kit screen reader instructions should be present in the DOM
|
||||
expect(screen.getByText(/To pick up a draggable item/i)).toBeInTheDocument()
|
||||
|
||||
// Live region for announcements should exist
|
||||
const liveRegion = screen.getByRole('status')
|
||||
expect(liveRegion).toHaveAttribute('aria-live', 'assertive')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user