Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define the autofill pseudo-class. #6273

Merged
merged 2 commits into from
Jan 11, 2021
Merged

Define the autofill pseudo-class. #6273

merged 2 commits into from
Jan 11, 2021

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Jan 8, 2021

@annevk
Copy link
Member

annevk commented Jan 8, 2021

Why is the alias a may? Would any browser not implement it? Is there a test for the alias being done at parse time? And is there a more formal way of defining that?

@emilio
Copy link
Contributor Author

emilio commented Jan 8, 2021

It seemed a bit weird to require a WebKit prefix in the HTML spec, it was mostly given as a hint. The alias is somewhat needed for compat right now, but if authors adopt the unprefixed pseudo-class (once implemented everywhere), hopefully eventually it will not.

@annevk
Copy link
Member

annevk commented Jan 8, 2021

If everyone implements it we should require it. We do the same webkitMatchesSelector() in DOM for instance. And then if implementations decide to remove it we can do so and change the pass condition for the test, though I'm not sure if it's worth trying to remove these.

@domenic
Copy link
Member

domenic commented Jan 8, 2021

Strong +1 for requiring :-webkit-autofill. Even if CSS itself makes it optional, it should be required for HTML user agents.

@emilio
Copy link
Contributor Author

emilio commented Jan 8, 2021

Alright, changed it to must, will update the wpt PR as well.

@@ -68530,6 +68530,15 @@ Demos:
</ul>
</dd>

<dt><dfn noexport><code data-x="selector-autofill">:autofill</code></dfn></dt>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just do two <dt>s, one for each selector, so that they're on equal footing?

Also, is there any normative connection we can state with https://html.spec.whatwg.org/#autofill ? It seems like that section is all about the autocomplete="" processing model, so if user agents autofill values beyond just those annotated, then maybe there is no such connection...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just do two

s, one for each selector, so that they're on equal footing?

Sure, done.

Also, is there any normative connection we can state with https://html.spec.whatwg.org/#autofill ? It seems like that section is all about the autocomplete="" processing model, so if user agents autofill values beyond just those annotated, then maybe there is no such connection...

Yeah, pretty sure autocomplete is not the only thing that is looked at for form autofill...

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed another commit that made them on more equal footing, and also added a note about other sources of autofilling. PTAL to make sure I haven't done anything wrong :).

@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2021

Looks good, thanks! I'd keep the mention that :-webkit-autofill is legacy, but it looks good anyways :)

@domenic domenic added the addition/proposal New features or enhancements label Jan 11, 2021
@domenic domenic merged commit 228e28f into whatwg:master Jan 11, 2021
@emilio emilio deleted the autofill branch January 11, 2021 19:26
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 12, 2021
sidvishnoi pushed a commit to sidvishnoi/gecko-webmonetization that referenced this pull request Jan 12, 2021
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2021
Spec PR at whatwg/html#6273
Tests at web-platform-tests/wpt#27098

Differential Revision: https://phabricator.services.mozilla.com/D101148

UltraBlame original commit: 28268df8154dad7a2e686ff95ad5559a46316cbf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements
Development

Successfully merging this pull request may close these issues.

3 participants