You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New attribute to control UA-provided writing assistance #9065
addition/proposalNew features or enhancementsagenda+To be discussed at a triage meetingneeds concrete proposalMoving the issue forward requires someone to figure out a detailed plantopic: formsForms and form controls: input types, submission, constraint validation and autofill
The current specification allows for the autocomplete attribute to exist on elements of type <input>, <textarea>, and <select>. With the rise in popularity of rich text controls using contenteditable, we should consider allowing elements who have contenteditable=true to utilize the autocomplete attribute. While not a common scenario within the scope of form fields, there are applications for text hinting and autofill within contenteditable elements.
One existing example of a form field being replaced by contenteditable exists in the example section of its specification.
Editing hosts don't have a way to signal what kind of input is accepted (e.g. single line vs multiline). Which "groups" should editing hosts be part of? All of them?
Editing hosts don't have a way to signal what kind of input is accepted (e.g. single line vs multiline). Which "groups" should editing hosts be part of? All of them?
I think contenteditable will always be a Text-Multiline host. I can't think of any cases where the other groups would apply. We also may want to expand the Field Name to include additional types of content in the future.
Here is our proposal to adjust the wording of 4.10.18.7.1 Autofill to allow for editing host elements to be eligible for autofill and the autocomplete attribute.
Seems reasonable, but I'm not an autocomplete expert. I do worry about the leakage of sensitive information, if autocomplete can more easily be tricked into filling general <div> with PII. But as mentioned, that risk already exists with <input> so I'm not sure why this would be worse. @battre would have better input from Chrome's side.
What are the considerations around events? contenteditable involves quite a bit more events, do any need to be simulated when autofilling? The solution needs to address that somehow.
Thanks @mfreed7, @marcoscaceres, @domenic for the feedback on #10018. Calling out a few points about the new attribute that came out of that, which might be worth discussing in more detail during the next WHATNOT meeting.
Per discussion on the above points during today's WHATNOT call, the only suggested change to #10018 was to align the inheritance behavior with spellcheck, and address inheritance across shadow boundaries for both attributes (and possibly others) separately. I've updated that PR accordingly. Please let me know if there's additional feedback on that one.
This should define interaction with field-sizing CSS property, if writing suggestions can appear inline and contain potentially privacy-sensitive information. See #9903 (comment)
This should define interaction with field-sizing CSS property, if writing suggestions can appear inline and contain potentially privacy-sensitive information. See #9903 (comment)
The scope of this new attribute just grants authors the ability to turn off UAs' writing suggestions capabilities. An attempt hasn't been made to standardize the details of those capabilities, and they could vary widely. So while I agree that the interaction of field-sizing with UA writing suggestions and autofill needs to be worked out, it's not really in the purview of the writingsuggestions toggle attribute defined here.
@dandclark it seems weird to me to include email but not telephone. If this feature can suggest email addresses, surely it can suggest telephone numbers as well.
@annevk @sanketj pointed out to me that the list of supported elements was originally taken from element types of the spellcheck attribute under User agents must only consider the following pieces of text as checkable for the purposes of this feature.
I think that list is a reasonable starting point, and given the current design in #10018 it could be expanded without breaking backwards compatibility, but I don't have any particular objection to adding "telephone".
addition/proposalNew features or enhancementsagenda+To be discussed at a triage meetingneeds concrete proposalMoving the issue forward requires someone to figure out a detailed plantopic: formsForms and form controls: input types, submission, constraint validation and autofill
Activity
annevk commentedon Mar 23, 2023
cc @whatwg/forms
bmathwig commentedon Mar 23, 2023
Microsoft is interested in implementing this in Edge and Chromium :)
zcorpan commentedon Mar 27, 2023
cc @DimiDL @galich @masayuki-nakano
zcorpan commentedon Mar 28, 2023
Autocomplete works differently on different form controls, see https://html.spec.whatwg.org/#inappropriate-for-the-control
Editing hosts don't have a way to signal what kind of input is accepted (e.g. single line vs multiline). Which "groups" should editing hosts be part of? All of them?
annevk commentedon Mar 28, 2023
WebKit is also interested in this.
(For maximum clarity, Chromium and Edge count as a single implementer for WHATWG purposes.)
bmathwig commentedon Mar 28, 2023
I think
contenteditablewill always be a Text-Multiline host. I can't think of any cases where the other groups would apply. We also may want to expand the Field Name to include additional types of content in the future.bmathwig commentedon Jul 12, 2023
Here is our proposal to adjust the wording of 4.10.18.7.1 Autofill to allow for editing host elements to be eligible for autofill and the autocomplete attribute.
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/AutocompleteContentEditable/explainer.md
sanketj commentedon Jul 20, 2023
@annevk, @domenic, @mfreed7, @zcorpan: Curious to hear your thoughts on the proposal Ben shared above.
mfreed7 commentedon Aug 3, 2023
Seems reasonable, but I'm not an autocomplete expert. I do worry about the leakage of sensitive information, if autocomplete can more easily be tricked into filling general
<div>with PII. But as mentioned, that risk already exists with<input>so I'm not sure why this would be worse. @battre would have better input from Chrome's side.annevk commentedon Aug 25, 2023
What are the considerations around events?
contenteditableinvolves quite a bit more events, do any need to be simulated when autofilling? The solution needs to address that somehow.cc @johanneswilm
32 remaining items
[WritingSuggestions] Update explainer to propose new attribute instea…
sanketj commentedon Jan 11, 2024
Thanks @mfreed7, @marcoscaceres, @domenic for the feedback on #10018. Calling out a few points about the new attribute that came out of that, which might be worth discussing in more detail during the next WHATNOT meeting.
sanketj commentedon Jan 11, 2024
Per discussion on the above points during today's WHATNOT call, the only suggested change to #10018 was to align the inheritance behavior with
spellcheck, and address inheritance across shadow boundaries for both attributes (and possibly others) separately. I've updated that PR accordingly. Please let me know if there's additional feedback on that one.zcorpan commentedon Feb 2, 2024
This should define interaction with
field-sizingCSS property, if writing suggestions can appear inline and contain potentially privacy-sensitive information. See #9903 (comment)annevk commentedon Feb 9, 2024
@sanketj Why does it work for type=email but not type=telephone?
dandclark commentedon Feb 9, 2024
I guess the principle of the current list is "types that expect character input that's not numbers-only, excepting password".
dandclark commentedon Feb 9, 2024
@zcorpan
The scope of this new attribute just grants authors the ability to turn off UAs' writing suggestions capabilities. An attempt hasn't been made to standardize the details of those capabilities, and they could vary widely. So while I agree that the interaction of
field-sizingwith UA writing suggestions and autofill needs to be worked out, it's not really in the purview of thewritingsuggestionstoggle attribute defined here.Maybe worth a new issue?
annevk commentedon Feb 10, 2024
@dandclark it seems weird to me to include email but not telephone. If this feature can suggest email addresses, surely it can suggest telephone numbers as well.
dandclark commentedon Feb 14, 2024
@annevk
@sanketj pointed out to me that the list of supported elements was originally taken from element types of the
spellcheckattribute underUser agents must only consider the following pieces of text as checkable for the purposes of this feature.I think that list is a reasonable starting point, and given the current design in #10018 it could be expanded without breaking backwards compatibility, but I don't have any particular objection to adding "telephone".
Add writingsuggestions="" attribute
Add writingsuggestions="" attribute