From ea6e598899bcba6da6cf7df585cf8ec630c65acb Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Tue, 31 Oct 2023 21:53:28 -0700 Subject: [PATCH 1/5] Add note about typical autocomplete combos --- index.bs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 564e2529d..73ab443bf 100644 --- a/index.bs +++ b/index.bs @@ -2408,8 +2408,18 @@ When this method is invoked, the user agent MUST execute the following algorithm
If |options|.{{CredentialRequestOptions/mediation}} is {{CredentialMediationRequirement/conditional}} and the user interacts with an <{input}> or <{textarea}> form control with an <{input/autocomplete}> attribute whose value - contains a `"webauthn"` [=autofill detail token=], + contains `"webauthn"` as the last [=autofill detail token=],
+
+ Note: The following are examples of typical values for the <{input/autocomplete}> attribute with the `"webauthn"` + [=autofill detail token=] in the correct position: + + - `"username webauthn"` + - `"current-password webauthn"` + + These examples are likely to trigger conditional UI across the greatest number of user agents. The expected ordering + of these tokens can be confirmed in the [=autofill detail token=] section of the the WHATWG HTML standard. +
:: 1. If |silentlyDiscoveredCredentials| is not [=list/empty=]: From f120690a4a3a98240ae930c341099d9cdb0ec1cc Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Tue, 31 Oct 2023 22:15:29 -0700 Subject: [PATCH 2/5] Try to generate valid HTML --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 73ab443bf..1a01a8d72 100644 --- a/index.bs +++ b/index.bs @@ -2410,8 +2410,8 @@ When this method is invoked, the user agent MUST execute the following algorithm and the user interacts with an <{input}> or <{textarea}> form control with an <{input/autocomplete}> attribute whose value contains `"webauthn"` as the last [=autofill detail token=], -
- Note: The following are examples of typical values for the <{input/autocomplete}> attribute with the `"webauthn"` + ::
+ Note: The following are example values for the <{input/autocomplete}> attribute with the `"webauthn"` [=autofill detail token=] in the correct position: - `"username webauthn"` @@ -2421,7 +2421,7 @@ When this method is invoked, the user agent MUST execute the following algorithm of these tokens can be confirmed in the [=autofill detail token=] section of the the WHATWG HTML standard.
- :: 1. If |silentlyDiscoveredCredentials| is not [=list/empty=]: + 1. If |silentlyDiscoveredCredentials| is not [=list/empty=]: 1. Prompt the user to optionally select a [=DiscoverableCredentialMetadata=] (|credentialMetadata|) from |silentlyDiscoveredCredentials|. From 5c7ca4d9ae384ed6c0b8f61cf9c0ae11c2a59153 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Wed, 15 Nov 2023 11:35:44 -0800 Subject: [PATCH 3/5] Incorporate PR feedback --- index.bs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/index.bs b/index.bs index 1a01a8d72..5b89d0185 100644 --- a/index.bs +++ b/index.bs @@ -2407,18 +2407,15 @@ When this method is invoked, the user agent MUST execute the following algorithm
If |options|.{{CredentialRequestOptions/mediation}} is {{CredentialMediationRequirement/conditional}} - and the user interacts with an <{input}> or <{textarea}> form control with an <{input/autocomplete}> attribute whose value - contains `"webauthn"` as the last [=autofill detail token=], + and the user interacts with an <{input}> or <{textarea}> form control with an <{input/autocomplete}> attribute whose + [=non-autofill credential type=] is `"webauthn"`,
::
- Note: The following are example values for the <{input/autocomplete}> attribute with the `"webauthn"` - [=autofill detail token=] in the correct position: + Note: The `"webauthn"` [=autofill detail token=] must appear immediately after the last [=autofill detail token=] + of type "Normal" or "Contact": - `"username webauthn"` - `"current-password webauthn"` - - These examples are likely to trigger conditional UI across the greatest number of user agents. The expected ordering - of these tokens can be confirmed in the [=autofill detail token=] section of the the WHATWG HTML standard.
1. If |silentlyDiscoveredCredentials| is not [=list/empty=]: From 228a1f8a9227988c0812628803dfabfd8b0feb3d Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Wed, 15 Nov 2023 12:08:41 -0800 Subject: [PATCH 4/5] Enable linking to non-autofill credential type --- index.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/index.bs b/index.bs index 5b89d0185..5c4b1d318 100644 --- a/index.bs +++ b/index.bs @@ -172,6 +172,7 @@ spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/ text: document.domain; url:dom-document-domain urlPrefix: form-control-infrastructure.html text: autofill detail token; url: autofill-detail-tokens + text: non-autofill credential type; url: non-autofill-credential-type spec: url; urlPrefix: https://url.spec.whatwg.org type: dfn From 139405f7388e37f6af60cf2a2d05ef4203aeb0bb Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Wed, 15 Nov 2023 12:18:55 -0800 Subject: [PATCH 5/5] Explicitly mention that these are examples --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 5c4b1d318..4c421eecb 100644 --- a/index.bs +++ b/index.bs @@ -2413,7 +2413,7 @@ When this method is invoked, the user agent MUST execute the following algorithm ::
Note: The `"webauthn"` [=autofill detail token=] must appear immediately after the last [=autofill detail token=] - of type "Normal" or "Contact": + of type "Normal" or "Contact". For example: - `"username webauthn"` - `"current-password webauthn"`