integration: disable the contact mailto until required fields are complete

Keep the submit control focusable with a disabled semantic while the briefing is incomplete, mark invalid fields only after interaction, and leave the encoded mailto path unchanged once the form is filled.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-25 19:32:22 +02:00
parent 1ff26be61b
commit 575ba06bb9
5 changed files with 115 additions and 6 deletions

View File

@@ -18,6 +18,10 @@ test.describe('contact briefing', () => {
await page.goto(pagePath('contact', 'de'), { waitUntil: 'networkidle' });
extras.length = 0;
const emptySubmit = page.locator('.submit');
await expect(emptySubmit).toHaveAttribute('aria-disabled', 'true');
expect(await emptySubmit.getAttribute('href')).toBeNull();
await page.locator('#contact-name').fill('Ada');
await page.locator('#contact-email').fill('ada@example.com');
await page.locator('#contact-projectType').selectOption('software');