On 17 September Apple released Safari 27, and with it one of the longest-awaited changes in form design: a native <select> you can style with CSS. Add appearance: base-select and the trigger button, the dropdown, the arrow and the checkmark all become yours to design. Chrome has supported the same feature since version 135, so for the first time a branded dropdown, in hand-built and AI-generated forms alike, no longer needs a JavaScript library that rebuilds the control from scratch and usually breaks the keyboard on the way.
It is a good moment to look hard at forms in general, because forms are where AI-generated interfaces most often look finished and are not. WebAIM’s 2026 analysis of the top one million home pages found missing form input labels on 51% of them, and a third of all inputs it checked were not properly labelled. WebAIM names “automated or AI-assisted coding practices” among the likely contributors. A contact form, a booking form or a checkout is usually the one place on a small business site where a visitor tries to do something. If it fails there, the design has failed, however good the hero looks.
This guide covers the small details that go wrong in AI-generated forms, why AI tools get them wrong, and how to prompt and review so they come out right.
Why AI-built forms look right and work badly
A language model builds a form the way it has seen forms built most often. Much of the web it learned from is exactly what WebAIM measures: grey placeholder text standing in for labels, focus outlines removed because a designer found them ugly, error messages that say “Invalid input”. The model reproduces the average, and the average is inaccessible.
Research backs this up. In a 2025 study presented at the W4A conference, Alexandra-Elena Guriţă and Radu-Daniel Vatavu tested interfaces generated by ChatGPT and Claude against WCAG 2.1. Prompts that explicitly asked for accessibility improved the results, but barriers remained, “particularly in semantic structure”, and alt text and status messages were still weak. So asking for accessibility helps, and it is not enough on its own. You still have to know what to check.
The second problem is visual. Most form failures are invisible in a screenshot. A missing label, a focus ring that never appears, an error that a screen reader never announces: none of these show up when you look at a generated mockup on a big monitor. You only find them by using the form with a keyboard, on a phone, and with the wrong data.
Labels, hints and the placeholder trap
The most common shortcut in AI-generated forms is the placeholder as label: a field that says “Email” in light grey until you start typing, then says nothing. W3C’s forms tutorial is blunt about it: placeholder text “is not a replacement for labels”, and screen readers do not treat it as one. It also disappears exactly when the user needs it, while they are checking what they typed.
Ask for these instead:
- A visible
<label>for every field, connected withforandid, sitting above the input rather than inside it. - Hint text as its own element, linked with
aria-describedby, for anything the user needs to know before typing: a format, a length, why you are asking. - The right input type and
autocompletevalue.type="email"andtype="tel"bring up the right phone keyboard.autocomplete="given-name","email"or"postal-code"lets the browser fill in saved details, and WCAG 2.2 success criterion 1.3.5 (Level AA) requires that the purpose of fields collecting personal data can be determined this way. - “Optional” marked in words on the few fields that are optional, rather than a red asterisk on everything else. Better still, remove fields you do not need.
Prompt · building a form that is accessible from the first draft · Source: Written for this article
Build a [booking request] form for [a physiotherapy clinic in Patras] in semantic HTML and CSS. Fields: [full name, email, phone, preferred day, reason for visit (optional), consent checkbox]. Rules: - Every field has a visible <label> above it, linked with for/id. Never use placeholder text as a label. - Hint text is a separate element linked with aria-describedby. Use one hint only where the format is not obvious. - Use the correct type and autocomplete value on each field (name, email, tel). - Mark optional fields with the word "(optional)". Do not use asterisks. - Group related choices in a <fieldset> with a <legend>. - The submit button is a real <button type="submit"> with a verb label: "[Request appointment]". - Text contrast at least 4.5:1, input borders and focus indicator at least 3:1 against the background. - A visible :focus-visible style on every control: [2px solid #1d4ed8 outline, 2px offset]. - Touch targets at least 44px high. Output the HTML and CSS only. After the code, list any accessibility decision you were unsure about.
Focus states AI-built forms often remove
Keyboard users, and many people using switch devices or voice control, rely on the focus indicator to know where they are. AI tools often generate outline: none on inputs and buttons, because so much of their training code does, and then forget to put anything back. The result is a form that works with a mouse and is a guessing game with a keyboard.
Three WCAG 2.2 criteria cover most of it. Non-text contrast (1.4.11, Level AA) asks for at least 3:1 contrast against adjacent colours for the parts of a control you need to see, which includes focus indicators and input borders that identify a field. Focus Not Obscured (2.4.11, Level AA), new in WCAG 2.2, says a focused element must be “at least partially visible”, which is where sticky headers, cookie banners and chat widgets often fail. Target Size (2.5.8, Level AA) sets a minimum of 24 by 24 CSS pixels for pointer targets, with some spacing exceptions. Small checkboxes and icon-only “clear” buttons are the usual offenders.
In practice: use :focus-visible so the ring shows for keyboard users without flashing on every mouse click, make it thick enough to see at a glance, and test it with the real cookie banner and chat widget loaded, not on a clean prototype.

Error messages that help people finish
“Invalid input.” “This field is required.” “Oops, something went wrong.” These are the error messages AI-generated forms show when nobody tells the model otherwise, and they all leave the user to work out what happened. The GOV.UK Design System has some of the clearest published guidance. Its error messages should “explain what went wrong and how to fix it”, in plain language, using words from the field’s own label. It advises against “please”, “sorry”, “valid” and “invalid”, and against jokes.
The difference is easy to see. “Enter your phone number” is an instruction for an empty field. “Phone number must include the area code, like 2310 123456” describes how to fix a wrong entry. Neither blames the user, and both say exactly what to do.
Timing matters as much as wording. GOV.UK recommends validating when the user tries to move on, not when they leave a field, and generally not while they are still typing. When errors appear, it shows an error summary at the top of the page, moves keyboard focus to it, links each item to its field, and keeps everything the user entered. In CSS, the :user-invalid pseudo-class, available in all major browsers since November 2023, helps here: unlike :invalid, it only matches after the user has interacted with the field, so a fresh form does not open covered in red.
Prompt · rewriting error messages · Source: adapted from the GOV.UK Design System error message guidance
Rewrite every error message in this form. For each field, write one message per error case:
empty, wrong format, too long or too short, and out of range where it applies.
Rules:
- Say what went wrong and how to fix it, in plain English, in under 12 words.
- Use an instruction for empty fields ("Enter your postcode").
- Use a description for wrong entries ("Postcode must be 5 digits, like 54622").
- Reuse the words of the field's label.
- Do not use: please, sorry, oops, invalid, valid, required, error occurred.
- The same text appears next to the field and in the error summary at the top.
Form fields and rules: [paste field labels and validation rules]
Return a table: field, error case, message.
The new styleable select, used with care
Back to the September news. Customizable select is a progressive enhancement: you opt in with appearance: base-select on both the <select> and its ::picker(select), then style ::picker-icon for the arrow and ::checkmark for the selected option. A new <selectedcontent> element controls what the closed control shows, and options can now hold richer HTML, such as a small flag or icon next to the text. The browser keeps handling focus, keyboard and accessibility bindings, which is the whole point compared with a homemade dropdown.
A few details matter, and this is where AI-generated forms need checking:
- It is not everywhere yet. MDN still lists customizable select as limited availability, not Baseline. Browsers without support show a normal dropdown and strip the extra markup from options, so the option text must make sense on its own.
- It replaces the phone’s native picker. Chrome’s guidance notes that opting in means the select no longer uses the built-in mobile operating system controls, such as the iOS scroll wheel. For a long list of countries on a phone, the native picker may still be the better experience.
- Decorations are silent. MDN notes that
::picker-iconand::checkmarkare not in the accessibility tree, so anything you put in their generated content is not announced. - It still needs a label and a name. A styled select without a
<label>is the same old problem in nicer clothes.
Prompt · a branded select that degrades gracefully · Source: adapted from Chrome’s Modern Web Guidance, “Branded select styling”
Style the [service type] <select> in this form with the customizable select API. - Opt in with appearance: base-select on select and on select::picker(select). - Style select::picker-icon for the arrow and option::checkmark for the selected state. - Use our tokens: [background #ffffff, text #1b1b1f, border #6b6b75, accent #0f766e, radius 6px]. - Keep the <label>, the name attribute and every option's value unchanged. - Option text must read correctly on its own, because older browsers show text only. - Give the control a fixed width or a grid constraint; base-select no longer sizes itself to the longest option. - Check that text and borders meet contrast (4.5:1 text, 3:1 borders and focus). - Wrap the custom styles in @supports (appearance: base-select) so other browsers keep the native select. Explain in two lines whether this select should keep the native picker on mobile, given it has [number] options.
Contrast, rebrands and the European Accessibility Act
Low-contrast text is the most common failure WebAIM finds, on 83.9% of home pages in 2026. In forms it hides in specific places: placeholder text, hint text, disabled-looking but active buttons, and pale grey input borders that vanish on a white background. AI tools reach for these soft greys because they look calm and modern in a screenshot.
This is no longer only a usability argument. The European Accessibility Act has applied since 28 June 2025, and e-commerce services are among the services it covers. The details in this guide (labels, contrast, focus, clear errors) are part of what an online shop selling to EU consumers should expect to be checked on. This is not legal advice: the Act sets some exemptions, including one for the smallest service businesses, and each country enforces it through its own law, so check with your own advisers. The practical point is simple: a template or an AI-generated form can pass a quick scan in its demo colours and fail once your own brand colours, images and plugins go in. Test the form you actually publish.

A review checklist for AI-generated forms
Run this on every AI-generated form before it goes live. It takes about fifteen minutes and needs no special software beyond the browser.
- Tab through the whole form with the keyboard only. Can you reach, see and operate every control, in a logical order, with the focus ring always visible and never hidden behind a sticky bar or banner?
- Click every label. Clicking a label should put the cursor in its field or tick its checkbox. If it does not, the label is not connected.
- Delete every placeholder in the browser’s inspector. Is the form still understandable?
- Submit it empty, then with wrong data. Does each error say what to do? Does focus move to a summary? Is everything you typed still there?
- Fill it on a phone, with autofill on. Do the right keyboards appear? Does autofill land in the right fields? Are targets easy to hit?
- Check contrast of labels, hints, placeholder, borders, focus ring and button text in your real brand colours.
- Zoom to 200% and check nothing overlaps or gets cut off.
- Listen once with a screen reader (VoiceOver on Mac and iPhone, NVDA on Windows, TalkBack on Android). Each field should announce its label, hint and error.
- Read the success message. Does the user know what happens next and when?
Prompt · asking AI to review its own form · Source: Written for this article
Review this form markup and CSS as a strict accessibility reviewer. Do not rewrite it yet. Check, and report pass or fail with the line where the problem is: 1. Every input, select and textarea has a programmatically connected visible label. 2. No placeholder is used as a label. 3. Hints and errors are linked with aria-describedby. 4. Inputs collecting personal data have correct type and autocomplete values. 5. No outline: none without a visible :focus-visible replacement. 6. Focus indicator and input borders reach 3:1 contrast; text reaches 4.5:1. 7. Targets are at least 24x24 CSS px. 8. Error messages say what went wrong and how to fix it. 9. Errors appear on submit, with a summary that receives focus. List what you cannot verify from code alone (for example, a sticky header covering focus) so I can test it by hand. [paste HTML and CSS]
The last line of that prompt matters. An AI review is a useful first pass, and it catches missing labels and removed outlines reliably, but some problems only appear in the live page. The checklist above is still the real test.

The details are the design
Last month we looked at making a template your own. Forms are where that effort pays off or leaks away: a site can have a distinctive typeface and art direction and still lose the enquiry because the phone field rejected a space. AI is fast at producing the shape of a form. The labels, focus states, messages and timing are where AI-generated forms still need a careful human review. If you would like a second pair of eyes on the forms your business depends on, get in touch.
Part of our Designing with AI series: one practical guide on the 15th of every month about using AI for interface design, web design and templates, and doing it well.
Keep reading. Previous: Templates done right. Next: Motion with purpose: animation that helps. All articles in Designing with AI.
Sources
- WebKit: WebKit features for Safari 27.0
- Chrome for Developers: The select element can now be customized with CSS
- Chrome for Developers: Modern Web Guidance, Branded select styling
- MDN: Customizable select elements
- MDN: :user-invalid
- WebAIM: The WebAIM Million (2026)
- Guriţă and Vatavu, W4A 2025: When LLM-Generated Code Perpetuates User Interface Accessibility Barriers
- W3C WAI: Forms tutorial, User notifications and instructions
- W3C WAI: What’s new in WCAG 2.2
- W3C WAI: Understanding non-text contrast
- W3C WAI: Understanding identify input purpose
- GOV.UK Design System: Error message
- GOV.UK Design System: Validation
- National Disability Authority (Ireland): What is the European Accessibility Act?