From f95851ed1662c9fc454bf48991c43174dbf57ed7 Mon Sep 17 00:00:00 2001
From: Christoph Schwering User agents are not limited to the form controls of a specific Some user agents have features for helping users fill forms in, for example prefilling the
+ Some user agents have features for helping users fill in forms, for example prefilling the
user's address based on earlier user input. They may autofill either an individual form control or
multiple controls at once. A user agent might offer the user to automatically fill their address in a form like the
- following. A user agent might offer the user to automatically fill their address in the following
+ form. For example, the user agent could suggest values to fill when the user focuses or types in
+ For example, the user agent could suggest values to fill when the user focuses or types into
one of the controls. The user agent may fill multiple controls at once even if they have different
+ The user agent may fill in multiple controls at once even if they have different
form owners, root nodes, or even
node documents. However, the user agent should only fill in
controls that are eligible for autofill. A form control control is eligible for autofill if control's
node document document is a fully active descendant of a top-level
- traversible with user attention and one of the following is true:form
- in their automatic filling. In particular, they might consider fields from different documents
+ in their automatic filling. In particular, they can consider fields from different documents
as explained in the eligible for autofill section.Autofill
-
<label> Country: <select>...</select> </label>
</form>
- <form method=post action="https://pizza.exampe.com/order.cgi">
<label> Name: <input></textarea> </label>
@@ -55594,11 +55594,11 @@ form.method === input; // => true
Some element is focused and its node document's @@ -55620,7 +55620,15 @@ form.method === input; // => true
The user agent does not have to fill in all eligible form controls, and it can fill
- in form controls that are not eligible. In particular, it can ignore
- shared-autofill
depending on the type of data
- to be filled and the relationships of the controls' node navigables. For example:
Whether a form control is eligible for autofill by means of
+ shared-autofill
might be beyond control of the
+ focused document: policy-controlled
+ features can be enabled or disabled by a parent document in its children, but not vice
+ versa. This reflects how form controls in cross-origin iframes are commonly seamlessly integrated
+ with the top-level document. The user agent might ignore
+ shared-autofill
in documents that are not
+ descendants of the focused document, perhaps depending on the value that would be filled.
The user agent can ignore shared-autofill
- when filling in usernames and passwords which are associated to a specific
- origin.
The user agent can ignore shared-autofill
- in Document
s whose navigable is not a descendant
- of the fully active descendant of a top-level traversible with user attention
- because payment form controls are frequently hosted in cross-origin iframe
s
- like in the example above.
-
The user agent can fill in cross-origin form controls because the user - consented.
The user agent might generally ignore
+ shared-autofill
in cross-origin frames
+ when filling in usernames and passwords since these credentials might be associated to a specific
+ origin.
On the other hand, the user agent might fill in cross-origin form controls in the absence of
+ shared-autofill
if it thinks this is the user's
+ intention, for example, because the user consented.