#1197: Incubation: Autofill Event

Visit on Github

Opened Feb 19, 2026

Explainer

https://github.com/WICG/autofill-event/tree/main?tab=readme-ov-file#autofill-event

The explainer

Where and by whom is the work is being done?

  • GitHub repo: https://github.com/WICG/autofill-event
  • Primary contacts:
    • Yoav Weiss (@yoavweiss ), Shopify
    • Christoph Schwering (@schwering), Google Chrome
  • Organization/project driving the design: Shopify
  • This work is being funded by: Shopify
  • Incubation and standards groups that have discussed the design:
  • Standards group(s) that you expect to discuss and/or adopt this work when it's ready: AutofillCG

Feedback so far

You should also know that...

No response

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1197

Discussions

Log in to see TAG-private discussions.

Discussed Mar 16, 2026 (See Github)

Christian: this is interesting. The proposal wants to solve this: for example, if you change the country in a form due to an autofil request by the user ("fill in my personal data" in the browser), this may lead to a re-rendering of that form becasue address lines work differently across different countries. And if you re-render the form, the autofil content is lost. So they propsoe providing an event where you can programmatically trigger a refill after basically rearranging the form. Currently what web authoris do is they add all the forms inputs, make them hidden and then physically just move them around.

Sarven: I'm curious about this, concerns on the accesibility repainting or changing visibilitly of forms, values going missing. Were there a11y concerns to begin with with live-updating teh form ,I presume the web page is not updated, it's just a DOM update. Were concerns raised?

Christian: not yet. This is new, we've just started looking at this.

Luke: I wonder if the atomic move DOM operation somewhat solves this case? would rely on them using that for doing their rendering. you can move around elements in the DOM already. I'm wondering why the current solutions clear the autofill. Seems like getting rid of the entire form and re-rendering it, maybe it's not the best way of building the form in the first place.

Hadley: Have a suspicion, form may be structurally different after changing countries, for exmaple counties which are important in UK, but don't exist in American addresses. If you don't find the answer to your question in the explainer, we should ask.

Marcos: Just had a look at the API design. Because you have all of these hidden elements, you may fill in too much fields. Autofill has been around for a long time. Wonder what the privacy implications are, and if it makes the situation better, but suspect that the proponents from Shopify already thought about this. Anyway, these are my initial thoughts, need to check it in more detail.

Matthew: Generally very concerned about the privacy aspects of it. Think I’ve heard people saying that this is a legitimate use case. Seems like a very specific use case. Want to mention what Sarven asked about a11y. Think there’s nothing to this other than dynamic form. The best practice is that you shouldn’t change form fields that are above the current focus. Don't change forms the user has already filled in. Already covered by WCAG. I am pretty interested in this.

Sarven: Also, the browser still needs to differentiate between what is potentially autofillable vs. the parts that were autofilled in the form. The form may have autofilled a bunch of things. What happens if the user cleared an autofilled field and now the form is rebuilt and the field is refilled? To add to Matthew’s point, if it updates things prior to the current focus, they may even end up submitting the form with parts that they didn’t want to submit.

Hadley: +1 to that, this is a big worry. Wanted to say that solutions for very specific use cases can lead to making the big picture worse.

Marcos: Concern is that sites may block/disallow autofilling ("you must type your email"). This might do bad things.

Luke: that's already detectable to say.... there's stuff like the autofill pseudo element and studio class. which sites can use to detect the field being autofilled. so it would be new in that it's more easily script observable. Because I think you'd have to request annimation fram, matches check or something.

Marcos: WebKit actually types it in, letter by letter.

Luke: Also, validations. Might this work around validations?

Marcos: Really good input, we can try to bring all those aspects together. Need to check what the autocomplete attribute does.

Discussed Mar 16, 2026 (See Github)

Heather: This is what I asked about on Slack with Marcos and Christian, to see if they were doing what I thought they were doing.

Marcos: I haven't read this yet.

Heather: Marcos and Christian should absolutely be on the tech side of things; I'm particularly interested in the broader ramifications of how this might be used.

Marcos: Definitely raise points that don't make sense from a human perspective. they'll help all readers.

Discussed Mar 30, 2026 (See Github)

Christian: We are collecting concerns at the moment.

Discussed Apr 6, 2026 (See Github)

Heather: not finished the review yet.

Heather: I wrote down my points and fed them to chatGPT to make them coherent. Is everyone ok with that?

Jeffrey: not sure as previous experiences were not ideal. I prefer to have another look from humans to ensure hallucinating or redundant content. There is a policy for it.

Matthew: I read through it and it does not seem odd (there are some pieces)

Heather: I had some issues about the race condition that could happen if there are conflicting items. I also have some points on the security and privacy. It needs expert review.

Jeffrey: the race condition already exists becsause browser autofill and this react to this in parallel. We are trying to make it better, but I can't say it is successfull.

Heather: I am not an implementor, but it seems like an issue to me.

Christian: I am very busy and I want to support heather but it is not possible in two weeks.

Discussed Apr 20, 2026 (See Github)

Heather: This one has quite a bit of commentary. Marcos and I met on Tuesday and I don't know that we're any closer to a final statement but there's quite a bit to consider. I'm not sure how to take it to next steps without having him around to discuss.

Lola: There may be enough for a draft comment, do you feel like there is?

Heather: I'm unsure.

Lola: identifies comments from GH which can be pulled into draft comment Does that sound actionable?

Heather: Yes!

Discussed Apr 27, 2026 (See Github)

Christian: Heather is on this, and was collecting concerns.

Marcos: Think we are waiting for Matthew for a11y considerations. We think it’s quite problematic from that standpoint.

Matthew: I’ve been following this. I think there were good a11y questions to raise. Acknowledge the concerns around interoperability. Don’t have any additional/specific concerns to add.

Luke: (Comment on a11y/interoperability).

Lola: Would encourage you to post that comment. (https://github.com/w3ctag/design-reviews-private-brainstorming/issues/252)

Discussed May 11, 2026 (See Github)

closed

Christian: This should not be closed, we are asking for feedback.

Marcos: Right, it should stay open.

Hadley: Ok, will reopen it.

Matthew: I added the "waiting for external feedback" label.

Christian: And then we should wait for the proponents to respond.

Hadley: Will reach out to Heather that say that we've done this.

Comment by @hlflanagan May 13, 2026 (See Github)

Thanks for the proposal. We have a few questions and comments for your consideration.

First, we think you should standardize UA behavior when forms change as a result of autofill, particularly where dynamically rendered or progressively disclosed forms may not align with the user agent’s original understanding of the form structure, and then see whether you actually still need a new developer-visible feature. Interoperable test coverage here seems important.

Second, there are privacy considerations that would benefit from further development. In particular:

  • whether sites could use this feature to infer information about stored user profile data more than is currently possible,
  • whether hidden or dynamically inserted fields create new data collection opportunities,
  • whether users understand what data is shared when autofill is invoked. (This will likely vary per browser UI, but you might demonstrate some possibilities that are likely to explain what data is exposed by dynamic autofill.)

Third, we have questions as to how this would interact with form validation. This behavior is already not interoperable across different browsers. For example, on Chromium, autofill does not trigger validation updates, so you can autofill a form with invalid data and then submit it. In Safari and Firefox, it does trigger validation. The expected behavior should be more fully specified.

We are also concerned about potential user experience risks, including:

  • pages responding to the autofill event in ways users may find surprising or disruptive,
  • pages clearing, rejecting, or interfering with autofilled values,
  • pages gaining signals about whether data was autofilled versus manually entered, where that distinction may not be necessary for the user’s benefit.

We also noticed some areas that appear underdeveloped in the current explainer:

  • accessibility considerations, particularly for dynamic form changes and event sequencing,
  • clearer handling and consent expectations for full-address requests.

One omission from the draft: the spec and explainer currently contradict each other:

Spec: bubbles: true; README: "The event does not bubble"
Spec: autofillValues; README: values
README: checkbox/radio values are boolean; Spec IDL: typedef sequence<any> ([HTMLElement, DOMString])

It would be helpful to clarify which invariants you want to require for the user agent when it comes to user intent, data disclosure, and the final form state after page-script interaction. Also, consider gathering evidence as you proceed through origin trials to determine whether this helps the websites and any outcomes of a user study measuring what people understand from the adopted UIs. We suggest you also bring these ideas to WHATWG’s HTML Work Stream (instead of doing new work/API) and work on this together with the HTML folks. Another avenue where you might gather input is Interop 2027

Comment by @hlflanagan Jul 19, 2026 (See Github)

Following up. @yoavweiss , any further thoughts?

Comment by @yoavweiss Sep 2, 2026 (See Github)

Thanks for the thorough review, and apologies for the delay here..

We discussed your feedback at the Autofill CG call on May 20. Below is my attempt at summarizing that discussion:

1. Standardizing UA behavior on dynamic forms first

From talking to implementers, I'm not sure that there's appetite for standardization of the specific heuristics that user agents and autofill providers use. At the same time, I strongly agree that this area requires more test coverage, and beyond that, testability. Currently, there is no interoperable way to trigger autofill from an automated test, so WPT coverage for autofill is essentially impossible today. I previously took a stab at this in w3c/webdriver-bidi#706, which stalled in the WG for lack of implementer interest. The relevant draft is currently in the same incubation repo (webdriver_integration.bs). It's likely that any attempt to ship this API will also require shipping such testing facilities.

At the same time, it's unclear how standardizing UA behavior would absolve us from needing "a new developer-visible feature." Currently UAs don't have all the information they need to perform autofill at the time they are performing it, given that the address format and its fields depend on the country, and the country is not necessarily known before autofill triggered. Some UAs solve this with re-triggering autofill later if/when the form changes, but that's an inherently racy solution (and would be tricky to specify) when it doesn't keep the developer in the loop.

The industry's answer to that is hidden "honeypot" fields, which are hacky, hard to maintain and are user hostile. I'd love to see a future where those are no longer needed.

2. Privacy

The event does not expose any new information beyond what's currently exposed in the fields themselves once autofill ran. Beyond that, it's obsoleting the need for hidden fields (at least in supporting browsers), resulting in such browsers being able to e.g. stop filling hidden fields over time.

This is covered in the S&P questionnaire, but we'll make sure this is well covered in the spec's Privacy section.

3. Form validation

Thanks for pointing this out. It's unclear that Chromium's behavior is not a bug. IIRC, @stephenmcgruer signed up to look into this. At the same time, as part of specifying the feature (and introducing autofill test infrastructure), we should probably also specify and test that validation & autofill work according to our expectations.

4. User experience risks

This is the same concern WebKit raised. It took up most of the CG call, and we didn't really reach consensus on it.

My take is that I agree that pages that clear, reject, or fight autofilled values are harming users, and the platform shouldn't make that materially cheaper. But I don't think this event materially lowers the cost of that harm.

Adversarial sites motivated to detect autofill already can use the following for that purpose:

  • the :autofill pseudo-class
  • event-sequencing and timing signatures
  • trusted-vs-untrusted event heuristics
  • multi-field simultaneous-change heuristics.

User agents could e.g. put such abusive sites on a quirks list that would mean that event doesn't fire for them. Or they could enable the event for e.g. address forms but not other types of forms.

But not shipping the event won't materially change the abuse calculus while at the same time leave well-meaning site worse off, and having to resort to hacks to get their autofill working.

The flip side of this is that there's a good chance that a lot of what's perceived as abuse are actually site bugs, that are a function of today's autofill being overly complex. Shipping the API will actively help these cases.

5. Accessibility

We'd appreciate specific concerns you may have on this. I'm personally not sure about the difference between forms changing dynamically as a result of the "autofill" event, and ones that do so as a result of a "change" event.

6. full-address

That's a part that's not yet implemented (it's not really needed in Chromium, which AFAIU assumes that user consent for an address autofill covers all of it already). It's something that other implementers and autofill providers told us they may need, as they have a different model.

7. Other

One omission from the draft: the spec and explainer currently contradict each other:

Spec: bubbles: true; README: "The event does not bubble"
Spec: autofillValues; README: values
README: checkbox/radio values are boolean; Spec IDL: typedef sequence<any> ([HTMLElement, DOMString])

Thanks for catching that!! We'll fix it :)

It would be helpful to clarify which invariants you want to require for the user agent when it comes to user intent, data disclosure, and the final form state after page-script interaction.

I'm not sure I understand this one. Autofill is an existing browser feature, and this feature integrates with it. This feature doesn't not redefine the various browsers' implementation of autofill.

Also, consider gathering evidence as you proceed through origin trials to determine whether this helps the websites and any outcomes of a user study measuring what people understand from the adopted UIs.

As the API doesn't change the UI and is not user facing, I don't think there's any need for a user study. The Origin Trial will enable us to measure the benefits of this approach, compared to the honeypot fields approach.

We suggest you also bring these ideas to WHATWG’s HTML Work Stream

Makes sense!

Another avenue where you might gather input is Interop 2027

It could've been interesting on the testing front, but as I mentioned above, there wasn't enough implementer interest in the relevant WG.