fix(frontend): increase dismiss button touch target to 44×44px (WCAG 2.5.5)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-17 21:50:05 +02:00
parent bbfd234746
commit da0a7e9194
2 changed files with 19 additions and 1 deletions

View File

@@ -73,6 +73,24 @@ describe('OcrTrainingCard — enabled state', () => {
});
});
describe('OcrTrainingCard — success dismiss button', () => {
it('dismiss button has 44×44px touch target (h-11 w-11)', async () => {
vi.stubGlobal('fetch', vi.fn().mockResolvedValue({ ok: true }));
render(OcrTrainingCard, { trainingInfo: baseInfo });
const btn = page.getByRole('button', { name: /Training starten/i });
await btn.click();
const dismissBtn = page.getByRole('button', { name: /Schließen/i });
await expect.element(dismissBtn).toBeInTheDocument();
const el = await dismissBtn.element();
expect(el.classList.contains('h-11')).toBe(true);
expect(el.classList.contains('w-11')).toBe(true);
});
});
describe('OcrTrainingCard — in-flight state', () => {
it('shows "…" while POST is in-flight', async () => {
let resolveFetch!: (v: unknown) => void;