Intent to Implement and Ship: :autofill pseudo-class

200 views
Skip to first unread message

Jaeyong Bae

unread,
May 31, 2021, 10:09:09 AMMay 31
to blink-dev
Contact emails
jdrag...@gmail.com

Feature summary
The :autofill pseudo-classes must match input elements which have been autofilled by user agent. These pseudo-classes must stop matching if the user edits the autofilled field.

Motivation
Support unprefixed :autofill pseudo-class, it would be good to sync browsers. To be able to change the default background color highlighting that is applied when input elements are auto-filled.

Tracking bug URL
https://bugs.chromium.org/p/chromium/issues/detail?id=1164311

Spec link
https://html.spec.whatwg.org/multipage/semantics-other.html#selector-autofill

TAG Review
Not needed since it's an existing spec discussed.

Interoperability and Compatibility Risks
Compatibility:
The compatibility risk of this feature should be low, as the feature is already implemented under a different selector name (:-webkit-autofill).

Interoperability:
There should be a very low interoperability risk for the :autofill selector as Firefox is already implementing it. Chrome also currently implements similar functionality through the selector :-webkit-autofill.

Firefox: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1685675)
Safari: Implemented with the vendor prefix: -webkit-
Edge: Implemented with the vendor prefix: -webkit-
Web developers: Positive (https://github.com/w3c/csswg-drafts/issues/5775)

Is this feature fully tested in Web Platform Tests?
Yes.
https://wpt.fyi/results/html/semantics/selectors/pseudo-classes/autofill.html

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5592445322526720

Manuel Rego Casasnovas

unread,
Jun 1, 2021, 5:33:50 AMJun 1
to Jaeyong Bae, blink-dev
Hi,

On 31/05/2021 16:09, Jaeyong Bae wrote:
> *Contact emails
> *jdrag...@gmail.com <mailto:jdrag...@gmail.com>
>
> *Feature summary
> *The :autofill pseudo-classes must match input elements which have been
> autofilled by user agent. These pseudo-classes must stop matching if the
> user edits the autofilled field.

Thanks for working on this, it's always nice to get rid of -webkit-
prefixed properties and support the standard ones.

> *Tracking bug URL*
> https://bugs.chromium.org/p/chromium/issues/detail?id=1164311
> <https://bugs.chromium.org/p/chromium/issues/detail?id=1164311>

It looks we don't have any way to measure the usage of this
pseudo-class, it'd be nice to add a use counter for it (see the
Measurement field in chromestatus: "It's important to measure the
adoption and success of web-exposed features. Note here what
measurements you have added to track the success of this feature, such
as a link to the UseCounter(s) you have set up.").
Even we could have different counters for the prefixed vs unprefixed
pseudos.

> *Spec link
> *https://html.spec.whatwg.org/multipage/semantics-other.html#selector-autofill

Some privacy concerns have been raised at
https://github.com/w3c/csswg-drafts/issues/5775#issuecomment-755793947.
Has that been discussed further? Does it apply to Chromium implementation?

> Safari: Implemented with the vendor prefix: -webkit-

Could you notify on webkit-dev, so they might also get the chance to
support the unprefixed pseudo? (see https://bit.ly/blink-signals).

> Web developers: Positive
> (https://github.com/w3c/csswg-drafts/issues/5775
> <https://github.com/w3c/csswg-drafts/issues/5775>)

Why this means that developer signals are positive?

> *Is this feature fully tested in Web Platform Tests?
> *Yes.
> https://wpt.fyi/results/html/semantics/selectors/pseudo-classes/autofill.html
> <https://wpt.fyi/results/html/semantics/selectors/pseudo-classes/autofill.html>

That test alone is not testing very much, but it looks like sadly we
lack support in WPT to test more things:
https://github.com/web-platform-tests/wpt/issues/27118

Cheers,
Rego

Mike West

unread,
Jun 7, 2021, 3:47:14 PMJun 7
to Manuel Rego Casasnovas, Jaeyong Bae, blink-dev

-mike


I've shared this with Chrome's autofill team, and I'll share whatever feedback I receive.
 

> Safari: Implemented with the vendor prefix: -webkit-

Could you notify on webkit-dev, so they might also get the chance to
support the unprefixed pseudo? (see https://bit.ly/blink-signals).

> Web developers: Positive
> (https://github.com/w3c/csswg-drafts/issues/5775
> <https://github.com/w3c/csswg-drafts/issues/5775>)

Why this means that developer signals are positive?

> *Is this feature fully tested in Web Platform Tests?
> *Yes.
> https://wpt.fyi/results/html/semantics/selectors/pseudo-classes/autofill.html
> <https://wpt.fyi/results/html/semantics/selectors/pseudo-classes/autofill.html>

That test alone is not testing very much, but it looks like sadly we
lack support in WPT to test more things:
https://github.com/web-platform-tests/wpt/issues/27118

Cheers,
  Rego

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/dd4568ad-b957-df04-f422-45bc2fb13ae5%40igalia.com.

Mike West

unread,
Jun 17, 2021, 2:18:39 PMJun 17
to Manuel Rego Casasnovas, Jaeyong Bae, blink-dev
Hello, Jaeyong!

I missed the autofill team's response earlier in the week: it was posted at https://bugs.chromium.org/p/chromium/issues/detail?id=951476#c6, and I'd suggest that engaging there would be useful. In particular, it would be helpful to understand our existing behavior vis a vis the "preview" mode for autofill, and to figure out together how to make sure it doesn't leak data prior to user interaction.

Thanks!

-mike

Mike West

unread,
Jul 15, 2021, 3:39:02 AMJul 15
to Manuel Rego Casasnovas, Jaeyong Bae, blink-dev
Rego noted that WebKit landed the unprefixed pseudo-class in https://commits.webkit.org/239313@main. From my perspective, that's a pretty clear signal that we should do the same since Chromium is now the odd one out.

It looks to me as though there's agreement on a path forward in https://bugs.chromium.org/p/chromium/issues/detail?id=951476, but I haven't seen movement in the last ~3 weeks. Is this intent still active? If not, perhaps we could reactivate it? :)

-mike

Romederful

unread,
Jul 15, 2021, 10:59:41 AMJul 15
to Mike West, Manuel Rego Casasnovas, blink-dev
Thanks for the check. Mike.

I'll reactivate it as soon as I can :)

2021년 7월 15일 (목) 오후 4:38, Mike West <mk...@chromium.org>님이 작성:

Alex Russell

unread,
Aug 5, 2021, 3:14:30 PMAug 5
to blink-dev, Jaeyong Bae, Manuel Rego, blink-dev, Mike West
Hey Jaeyong,

Wanted to make sure you aren't blocked here. Do you have updates, or are you looking for the OWNERs to assist here?

Best Regards,

Alex


-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Romederful

unread,
Aug 5, 2021, 3:23:53 PMAug 5
to Alex Russell, blink-dev, Manuel Rego, Mike West
Hello, Alex.

Sorry for the delayed updates.
The patches needed for this are currently under review[1].
Now proceed with the request again.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/3034804

Jaeyong

2021년 8월 6일 (금) 오전 4:14, Alex Russell <sligh...@chromium.org>님이 작성:

-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Alex Russell

unread,
Aug 12, 2021, 3:17:13 PMAug 12
to blink-dev, Jaeyong Bae, blink-dev, Manuel Rego, Mike West, Alex Russell, Dominic Battré, Christos Froussios, Vadym Doroshenko, Evan Stade, Fabio Tirelo, koe...@google.com, Christoph Schwering, Maxim Kolosovskiy, Mohamad Ahmadi, Roger McFarlane, Sebastien Seguin-Gagnon, Mohamed Amir Yosef
As it feels like this has been blocked for a while on us, I'm adding the //components/autofill/OWNERS here to make sure they're OK w/ this moving forward. Have also requested tests for the CL you mentioned, Jaeyong.

Thanks for following up.


-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike West

unread,
Aug 19, 2021, 3:14:28 PMAug 19
to Alex Russell, blink-dev, Jaeyong Bae, Manuel Rego, Dominic Battré, Christos Froussios, Vadym Doroshenko, Evan Stade, Fabio Tirelo, Matthias Körber, Christoph Schwering, Maxim Kolosovskiy, Mohamad Ahmadi, Roger McFarlane, Sebastien Seguin-Gagnon, Mohamed Amir Yosef
LGTM1.

Removing the `-webkit-` prefix seems quite reasonable to align with Firefox, and the conversation around the preview vs. filled states seems to be dealt with in the subsequent intent in https://groups.google.com/a/chromium.org/g/blink-dev/c/rCq-89BfJs0/m/xgQ967CVAQAJ.

-mike



-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Chris Harrelson

unread,
Aug 19, 2021, 3:15:27 PMAug 19
to Mike West, Alex Russell, blink-dev, Jaeyong Bae, Manuel Rego, Dominic Battré, Christos Froussios, Vadym Doroshenko, Evan Stade, Fabio Tirelo, Matthias Körber, Christoph Schwering, Maxim Kolosovskiy, Mohamad Ahmadi, Roger McFarlane, Sebastien Seguin-Gagnon, Mohamed Amir Yosef

Alex Russell

unread,
Aug 19, 2021, 3:16:22 PMAug 19
to blink-dev, Chris Harrelson, Alex Russell, blink-dev, Jaeyong Bae, Manuel Rego, Dominic Battré, Christos Froussios, Vadym Doroshenko, Evan Stade, Fabio Tirelo, Matthias Körber, Christoph Schwering, Maxim Kolosovskiy, Mohamad Ahmadi, Roger McFarlane, Sebastien Seguin-Gagnon, Mohamed Amir Yosef, Mike West
LGTM3


-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Reply all
Reply to author
Forward
0 new messages