<form autocomplete>

autocomplete 属性 (HTML)

[11] HTMLフォーム制御子autocomplete 属性は、 自動補完を有効とするべきかどうかを指定します。

[13]

状態
WHATWG 勧告案 (WD~LC)
要素
forminput
type
text, password, date, datetime, datetime-local, month, week, time, email, url, number, range, search, color, tel
属性名
autocomplete (auto complete (]自動補完]) より)
属性値
列挙型 (>>14)
既定値
on (>>15)

仕様書

属性値

[14] 指定可能な属性値:

[17] autocomplete 属性値off の場合、 利用者エージェントは、 そのを記憶するべきではありませんWF2 2.9

[18] >>17 以外の場合、利用者エージェントは、 利用者がそのに入力したを記憶し、 以後利用者がそのに戻った時に利用者エージェントフォームを予め埋めてられるようにして構いませんWF2 2.9

[3] WinIE 6 で試してみましたが、 大文字小文字は区別しませんでした。

[27] WinIE 6 では、 form/@autocomplete='off' のときは、 input/@autocomplete の指定は無視されます。 そうでないときは無視されません。

レンダリング

[19] Web Forms 2.0 は、自動補完の機構を具体的には定義していません。 利用者エージェントは、仕様書に違反しない範囲内で、 安全性個人情報保護を考慮した上で自由に自動補完機構を実装して構いませんWF2 2.9

[21] 利用者エージェントは、 利用者がこの属性への対応を無効化できるようにして構いません。 この属性への対応は既定状態で有効にするべきです。 無効化すると安全性の問題が生じる虞があるので、 利用者が簡単に無効化できるようにするべきではありませんWF2 2.9

[8] Mozilla では autocomplete 属性つきの input 要素は赤枠で表示されます。

安全性

[9] 自動補完のための記録を取っておくと、 その記録の保管場所や保管方法 (ファイルアクセス権など) によっては第3者に見られてしまうことがあります。また、 実際のフォーム入力時に候補を画面の後ろから覗き込まれたり、 他人に使わせた時に見られてしまったりすることもあります。 会員番号クレジット・カードの番号などが漏れてしまうと危険ですし、 そうでなくても本人の知られたくない個人的な情報を知られてしまう危険性があります。

利用者エージェントは:

  • 完全に自動補完を無効にできるべきです。
  • 自動補完が有効かどうか簡単に確認できるべきです。
  • 記録の保管方法について、その環境に合わせた安全な方法を採用するべきです。
  • 記録の一部又は全部を手動で消去できるべきです。
  • を閉じた時や他のサイトに移動した時など、 適当な時期に自動的に記録を消去する機能があると便利です。
  • サイト (ドメインpath) によって記録するかしないか選択できる機能があると便利です。
  • 共用の計算機での利用を想定するなら、 自動補完を使用するかの設定 (を含む各種の設定)管理者権限を要求 (例えば合言葉を要求) できるようにするべきです。
  • 個々のフォームや入力欄ごとに記録を消去する機能があると便利です。

管理者は:

利用者は:

  • 自動補完が有効かどうかに注意するべきです。
  • 共用の計算機自動補完が有効になっていた場合、 使用後に必ず記録を消去するべきです。

歴史

誕生

・・・

Web Forms 2.0 による標準化

[23] 銀行業界では、 Webサイトの入力欄で自動補完を無効化できることを非常に強く望んでおり、 それを受けて多くの利用者エージェントautocomplete 属性実装していました。 WF2 2.9

[22] W3C はこの状況を無視してきましたが、 Web Forms 2.0 は当初から autocomplete 属性を提案の中に含めていました。

form autocomplete

[53] 元々 HTML5 への WF2 の併合後、IEform 要素にも autocomplete 属性を持っており、 それへの対応が必要であろうと仕様書の注釈に記されていました。

[51] ですが、実際利用率は高くなく、一旦は不必要と判断されました。

give up on <form autocomplete>.

IE also applies it to <form> elements, but only 0.09% of pages use it there, so we don't support that. (It doesn't apply it to <textarea>, so we don't support it there either.)

[52] 2009年になって再考されて仕様に追加されました。

実装

[1] form 要素及び input 要素の autocomplete 属性は、 WinIE 5+ で実装されています。

[24] WinIE 6 では、 設定で自動補完しないことになっている場合には、 この属性の値が上書きすることはありません。

[7] >>6 によると、 Netscape 6.2 / Mozilla 0.9.4 以降では form 要素autocomplete 属性に対応しています。

[44] Chrome は指定がない時でも、 input に関連付けられている label が例えば「住所」だと住所扱いしてくれるみたいです。 部分一致ではなく完全一致のようで、「住所2」だと認識されません。

[20]

<p>Account: <input type="text" name="ac" autocomplete="off" /></p>
<p>PIN: <input type="text" name="pin" autocomplete="off" /></p>

銀行Webサイトでは、この例のように、 自動補完を無効化させたいことがよくあります。 WF2 2.9

[49] ログイン(SSLモード) - Yahoo! JAPAN (2007-07-03 23:33:48 +09:00 版) https://login.yahoo.co.jp/config/login

autocomplete="off"formだけ指定されています。

(名無しさん)

[50] キーワード ブログ検索 :: 最新ブログ記事のトレンドがわかる :: ( 版) http://tag.kutsulog.net/tags/category

<input name="data[Tag][text]"  autocomplete="off" size="10" style="width:200px;" value="" type="text" id="TagText" />

なんで off にしてるのだろう? (名無しさん)

関連

[4] 関連する機能として、 input 要素vcard_name 属性というのもありました。

歴史

[2] HTML AUTOCOMPLETE - HTML Code Tutorial http://www.htmlcodetutorial.com/forms/_INPUT_AUTOCOMPLETE.html

[41] 移転先: <input autocomplete=""> » () https://html.com/attributes/input-autocomplete/

[55] Web Applications 1.0 r5332 Change how .autocomplete is reflected.Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9636 ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5331&to=5332

[56] AndroidWebブラウザー<input type=email> があると <input type=password>自動補完がきかなくなるらしいです。

[57] [whatwg] Search-suggestions without scripting ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/035681.html

[58] [chrome] Index of /trunk/src/chrome/test/data/autofill/heuristics/input ( ( 版)) https://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/autofill/heuristics/input/

[59] Web Applications 1.0 r7208 Rearrange how 'autocomplete' is defined to make it possible to apply it to other controls ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7207&to=7208

[60] Web Applications 1.0 r7222 The second coming of autocomplete: now with lots more granularity. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7221&to=7222

[61] [whatwg] A mechanism to improve form autofill ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-August/036791.html

[62] Autofill forms - Google Chrome Help ( ( 版)) https://support.google.com/chrome/bin/answer.py?hl=en&answer=142893&p=settings_autofill

[63] Web Applications 1.0 r7242 Typo in field name for autocomplete ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7241&to=7242

[64] IRC logs: freenode / #whatwg / 20120802 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120802

[65] [whatwg] Autocomplete and autofill features and feedback thereon ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/038039.html

[66] [whatwg] Autocomplete and autofill features and feedback thereon ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-November/038039.html

[67] Web Applications 1.0 r7520 Fix autocomplete features based on recent feedback. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7519&to=7520

[68] [whatwg] Autocomplete and autofill features and feedback thereon ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038302.html

[69] IRC logs: freenode / #whatwg / 20121211 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121211

[70] Web Applications 1.0 r7983 Clarify formats for autofill fields ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7982&to=7983

[71] [whatwg] Proposal:Improve internationalization in the autocomplete attribute ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-June/039761.html

[72] Web Applications 1.0 r8100 Add 'country-name' field to autofill section, and some editorial polish around there. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8099&to=8100

[73] Web Applications 1.0 r8384 Define some authoring conformance criteria that e.g. prevent autocomplete='shipping tel' being set on an <input type=date> ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8383&to=8384

[74] Web Applications 1.0 r8383 Make the spec consistent on whether <select> takes autocomplete= (it now unambiguously does; this is, I believe, a new feature that browsers don't yet support).]] ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8382&to=8383

[75] Passsword managers and autocomplete='off' ( (Joel Weinberger 著, 版)) http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/1002.html

[76] [whatwg] Various autocomplete="" topics ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-April/126960.html

[77] Web Applications 1.0 r8569 Make 'autocomplete' and 'autocompleteerror' bubble, like 'submit'. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8568&to=8569

[78] Web Applications 1.0 r8569 Make 'autocomplete' and 'autocompleteerror' bubble, like 'submit'. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8568&to=8569

[79] Web Applications 1.0 r8573 Add some autofill keywords for usernames and passwords. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8572&to=8573

[80] [whatwg] Various autocomplete="" topics ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-April/254094.html

[81] [whatwg] Various autocomplete="" topics ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-April/254174.html

[82] Web Applications 1.0 r8648 autofill: requestAutocomplete() should not need the form in a Document; section-* should be opaque. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8647&to=8648

[83] Web Applications 1.0 r8654 Change how addresses are marked up for autofill, since some locales don't fit the region/locality split ( ( 版)) http://html5.org/r/8654

[84] Web Applications 1.0 r8656 Add 'autocomplete' IDL attribute to HTMLSelectElement for consistency. ( ( 版)) http://html5.org/r/8656

[85] Web Applications 1.0 r8735 Add transaction-currency and transaction-amount fields for autofill. ( ( 版)) http://html5.org/r/8735

[86] Web Applications 1.0 r8736 allow autocomplete to be specified on type=hidden ( ( 版)) http://html5.org/r/8736

[87] Web Applications 1.0 r8794 autofill: Encourage password saving. ( ( 版)) https://html5.org/r/8794

[88] Bug 25238 – autocomplete fields: API to trigger saving even when form is not submitted ( ( 版)) https://www.w3.org/Bugs/Public/show_bug.cgi?id=25238

[89] Credential Management ( ( 版)) https://mikewest.github.io/credentialmanagement/spec/

[90] Proposals for Gathering Consumer Demographics ( ( 版)) http://www.w3.org/Privacy/Proposals.html

[91] jQuery - autocomplete で入力中に候補を選択した場合、フォームにセットされない - Qiita ( ( 版)) http://qiita.com/syetuya/items/229e8adb75e24e031bcd

[92] [whatwg] PSA: Chrome ignoring autocomplete="off" for Autofill data ( (Evan Stade 著, 版)) http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Nov/0089.html

[10] Site Compatibility for Firefox 30 - Mozilla | MDN ( 版) https://developer.mozilla.org/en-US/Firefox/Releases/30/Site_Compatibility#<form_autocomplete.3D.22off.22_no_longer_prevents_passwords_from_being_saved>

<form autocomplete="off"> no longer prevents passwords from being saved

[25] CREDENTIAL: Drop 'autocomplete=off' discussion. (h/t @mnot) · w3c/webappsec@2cd56a7 ( 版) https://github.com/w3c/webappsec/commit/2cd56a7287ab9dbd4b85398bb7f8fe77b671eb27

[26] autocomplete wins over aria-autocomplete · w3c/aria@ab0ad6b ( 版) https://github.com/w3c/aria/commit/ab0ad6b6e2a527779c88dac0bc6cb3cbdabff65d

[28] Fix address-level in autocomplete example to match normative prose · whatwg/html@2eaf6c9 ( 版) https://github.com/whatwg/html/commit/2eaf6c9d3ca1bd46b136346ed01c5d433f71b62b

[29] 暮らしに役立つITコラム ChromeやSafariの自動入力機能が、なぜ「悪いデザイン」なのか · GitHub ( ()) https://gist.github.com/mala/a53e3f8a0c793a5c7bef2215dd951879

[30] Provide an option for datalist to be accent insensitive · Issue #2576 · whatwg/html () https://github.com/whatwg/html/issues/2576

[31] 25239 – autocomplete fields: mechanism to prevent saving fields after form submission () https://www.w3.org/Bugs/Public/show_bug.cgi?id=25239

[32] Re: [w3c/wcag21] Security of autofill (#590) (Daniel Veditz著, ) https://lists.w3.org/Archives/Public/public-webappsec/2017Nov/0022.html

[33] WebサイトにXSS脆弱性があった場合にブラウザのパスワード保存機能で保存したパスワードを読み取り可能かどうか - 金利0無利息キャッシング – キャッシングできます - subtech () https://subtech.g.hatena.ne.jp/mala/20110428/1303982930

[34] Editorial: always state invalid value default (GloverDonovan著, ) https://github.com/whatwg/html/commit/7e941ae96b264d4743ea0afac00c3b3209ab0cde

[35] Add autocomplete="confirm-password" to <input type="password"> · Issue #3531 · whatwg/html () https://github.com/whatwg/html/issues/3531

[36] New in Chrome 66  |  Web  |  Google Developers () https://developers.google.com/web/updates/2018/04/nic66?utm_source=feed&utm_medium=feed&utm_campaign

[37] Password Form Styles that Chromium Understands - The Chromium Projects () https://www.chromium.org/developers/design-documents/form-styles-that-chromium-understands

[38] IRC logs: freenode / #whatwg / 20140410 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20140410

[39] Web Applications 1.0 r8568 requestAutocomplete() ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8567&to=8568

[40] Remove form.requestAutocomplete() ( (domenic著, )) https://github.com/whatwg/html/commit/6a257aae619f85390eee20b47767f34887450fcd

[42] Support Japanese phonetic names to `autocomplete` attribute · Issue #5821 · whatwg/html · GitHub, https://github.com/whatwg/html/issues/5821

[43] Address form analysis, , https://battre.github.io/autocomplete-attribute-explainer/