<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>28228</bug_id>
          
          <creation_ts>2015-03-16 16:54:05 +0000</creation_ts>
          <short_desc>Specify the autocapitalize attribute</short_desc>
          <delta_ts>2017-12-08 22:13:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          <see_also>https://www.w3.org/Bugs/Public/show_bug.cgi?id=28747</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>d</cc>
    
    <cc>ehsan</cc>
    
    <cc>eoconnor</cc>
    
    <cc>florian</cc>
    
    <cc>ian</cc>
    
    <cc>jonas</cc>
    
    <cc>js_choi</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>T.J.Hunt</cc>
    
    <cc>w3bugs</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>118624</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-03-16 16:54:05 +0000</bug_when>
    <thetext>Mounir Lamouri&apos;s proposal:
https://github.com/mounirlamouri/html-autocapitalize/blob/master/proposal.md

The autocapitalize attribute is already shipping in Safari and there&apos;s an Intent to Implement and Ship for Blink:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/zF8dao594fs

Recent discussion on the WHATWG list:
https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Mar/thread.html#msg22

Bug 12409 is an earlier (rejected) request for the same feature, but that bug is for the HTML WG and so won&apos;t end up on Ian&apos;s table.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118626</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-03-16 17:14:37 +0000</bug_when>
    <thetext>Feedback copied from blink-dev so that it isn&apos;t lost:

The only issue I can see is in the minutiae of the states and reflection. Making the invalid value default depend on the input element state is atypical, a quick grep of the HTML spec and I can&apos;t find any other such case. Judging by WebKit&apos;s source [1] they ignore the input type for purposes of reflection. Can we do the same, and just ignore the autocapitalize attribute for input types other than text or search?

[1] https://trac.webkit.org/browser/trunk/Source/WebCore/html/Autocapitalize.cpp?rev=160733</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118652</commentid>
    <comment_count>2</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-03-17 13:57:35 +0000</bug_when>
    <thetext>I would be fine in dropping support for non text/search fields given that, as far as I can tell, Safari iOS doesn&apos;t support other fields, neither does Chrome Android WIP implementation (because of Android keyboard ignoring those hints for email/url/password fields - I would bet Safari iOS doesn&apos;t for the same reasons).

However, it means that the IDL attribute will return &quot;sentences&quot; for those types which sound a bit odd if not misleading. If that&apos;s something everyone here is fine with, I will be glad to update the proposal and my WIP implementation if that&apos;s the case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119989</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Hunt">T.J.Hunt</who>
    <bug_when>2015-04-29 11:11:42 +0000</bug_when>
    <thetext>When considering this, please consider contentEditable as well as input and textarea. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120110</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2015-05-05 21:41:39 +0000</bug_when>
    <thetext>I don&apos;t understand why this isn&apos;t just part of inputmode=&quot;&quot;. What&apos;s the use case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120115</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Hunt">T.J.Hunt</who>
    <bug_when>2015-05-05 22:56:09 +0000</bug_when>
    <thetext>Thanks for considering this.

I don&apos;t know why Apple invented autocapitalize when inputmode is something available in the standard. I also don&apos;t know why my Google searching for an answer to my use case only found discussion of autocapitalize, not inputmode, possibly because no browsers implement inputmode yet.

I do know that I need whatever attribute to work for contentEditable, not just input.

I note that inputmode does not work for textarea either, which seems an unnecessary omission.

To answer you actual question: my specific use case is a simple text input widget for online scientific quizzes, so users can easily enter answers like x&lt;sup&gt;2&lt;/sup&gt;, 3x10&lt;sup&gt;8&lt;/sup&gt;, H&lt;sub&gt;2&lt;/sub&gt;O, or SO&lt;sub&gt;4&lt;/sub&gt;&lt;sup&gt;2-&lt;/sup&gt;. Obviously there is JavaScript involved there, but some unwanted things that iOS does in contentEditable regions are proving hard to circumvent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120136</commentid>
    <comment_count>6</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-05-06 15:49:36 +0000</bug_when>
    <thetext>FWIW, Apple implemented autocapitalize years before inputmode was even a thing in HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120220</commentid>
    <comment_count>7</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-05-07 08:07:05 +0000</bug_when>
    <thetext>Safari has had autocapitalize for a long time and it&apos;s used on lots of websites, so I think it makes sense to just accept it as a standard and implement it everywhere. To me that seems far more likely to result in interop than hoping that WebKit would remove it.

If autocapitalize is a strict subset of inputmode then it would of course be ideal to specify them both on top of shared concepts. Looking at https://html.spec.whatwg.org/#input-modalities:-the-inputmode-attribute I can&apos;t see a 1:1 mapping. I think this is the closest approximation:

autocapitalize=&quot;none&quot; =&gt; inputmode=&quot;verbatim&quot;
autocapitalize=&quot;characters&quot; =&gt; ???
autocapitalize=&quot;words&quot; =&gt; inputmode=&quot;latin-name&quot;
autocapitalize=&quot;sentences&quot; =&gt; inputmode=&quot;latin-prose&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123029</commentid>
    <comment_count>8</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-02 09:55:44 +0000</bug_when>
    <thetext>For autocapitalize=&quot;characters&quot; is Unicode uppercase used or ASCII uppercase? Should we just invent a new inputmode that means the same thing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123030</commentid>
    <comment_count>9</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-02 10:06:53 +0000</bug_when>
    <thetext>(In reply to Anne from comment #8)
&gt; For autocapitalize=&quot;characters&quot; is Unicode uppercase used or ASCII
&gt; uppercase? Should we just invent a new inputmode that means the same thing?

I think only Unicode uppercase would make sense, otherwise I&apos;d get to see silly things like JäGENSTEDT from time to time.

As for inputmode, the problem is that autocapitalize has already shipped and is used in the wild, so supporting that will have a quick payoff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123031</commentid>
    <comment_count>10</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-02 10:10:39 +0000</bug_when>
    <thetext>I meant that if inputmode=&quot;&quot; is going to be the mechanism through which we support this &quot;new&quot; attribute, we would need a new keyword for Unicode uppercase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123033</commentid>
    <comment_count>11</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-02 11:59:12 +0000</bug_when>
    <thetext>Hmm, right. It&apos;s not strictly necessary to expose that new mode via inputmode, but it would make sense. It&apos;s hard to come up with a name that fits with the existing ones, they&apos;re mostly more semantic than &quot;uppercase&quot;.

Mounir, how do you mean to implement autocapitalize=characters, what does it map to on the platform?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123034</commentid>
    <comment_count>12</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-02 12:52:09 +0000</bug_when>
    <thetext>autocapitalize isn&apos;t meant to force capitalization. It&apos;s a hint to the virtual keyboard. In Chrome&apos;s implementation, it&apos;s simply telling the virtual keyboard to show uppercase characters. The user is allowed to go back to lower case ones obviously.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123035</commentid>
    <comment_count>13</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-02 13:02:08 +0000</bug_when>
    <thetext>(In reply to Mounir Lamouri from comment #12)
&gt; autocapitalize isn&apos;t meant to force capitalization. It&apos;s a hint to the
&gt; virtual keyboard. In Chrome&apos;s implementation, it&apos;s simply telling the
&gt; virtual keyboard to show uppercase characters. The user is allowed to go
&gt; back to lower case ones obviously.

I see. Do you think that an inputmode corresponding to autocapitalize=characters would make sense and if so what should it be called?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123058</commentid>
    <comment_count>14</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-03 11:12:07 +0000</bug_when>
    <thetext>I&apos;m not sure why it should be called anything different.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123059</commentid>
    <comment_count>15</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-03 12:24:04 +0000</bug_when>
    <thetext>(In reply to Mounir Lamouri from comment #14)
&gt; I&apos;m not sure why it should be called anything different.

Do you mean it should be called inputmode=capitalize?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123072</commentid>
    <comment_count>16</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-04 09:28:48 +0000</bug_when>
    <thetext>Out of curiosity, what&apos;s the rationale for introducing inputmode and how would that be different from autocapitalize?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123073</commentid>
    <comment_count>17</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-04 09:32:51 +0000</bug_when>
    <thetext>See https://html.spec.whatwg.org/#attr-fe-inputmode for how it&apos;s a rough superset in terms of functionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123074</commentid>
    <comment_count>18</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-04 09:55:10 +0000</bug_when>
    <thetext>See also comment #7. If we&apos;re further away from a mapping than it seems, then it may not be a good idea to try to build both on the same concepts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123083</commentid>
    <comment_count>19</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2015-09-04 15:14:45 +0000</bug_when>
    <thetext>Wasn&apos;t a large part of the reason for using &apos;autocapitalize&apos; that it was used by lots of websites out there, and has lots of developer mindshare? I.e. that it&apos;s already a cowpath that we should pave.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123084</commentid>
    <comment_count>20</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-04 15:17:46 +0000</bug_when>
    <thetext>Jonas, we should specify this attribute. The question is whether we should specify it in terms of inputmode, and if so, if inputmode should have a new value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123098</commentid>
    <comment_count>21</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-05 13:17:18 +0000</bug_when>
    <thetext>Given that inputmode isn&apos;t really implemented, I wonder if it would be better to not make autocapitalize depending on it (even if it is only editorial).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123106</commentid>
    <comment_count>22</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2015-09-05 22:40:42 +0000</bug_when>
    <thetext>If we have autocapitalize=characters, then why would we also implement an inputmode which has the same behavior?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123128</commentid>
    <comment_count>23</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-08 08:09:43 +0000</bug_when>
    <thetext>(In reply to Jonas Sicking from comment #22)
&gt; If we have autocapitalize=characters, then why would we also implement an
&gt; inputmode which has the same behavior?

It looks like the other three autocapitalize modes do map to an inputmode.

That being said, actually getting autocapitalize spec&apos;d is more important than whether or not it&apos;s a subset of inputmode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123129</commentid>
    <comment_count>24</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2015-09-08 14:39:33 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #23)
&gt; It looks like the other three autocapitalize modes do map to an inputmode.

Have those inputmode&apos;s been shipping in any implementations? If not, can we strike them from the spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123137</commentid>
    <comment_count>25</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-09 09:40:41 +0000</bug_when>
    <thetext>(In reply to Jonas Sicking from comment #24)
&gt; (In reply to Philip Jägenstedt from comment #23)
&gt; &gt; It looks like the other three autocapitalize modes do map to an inputmode.
&gt; 
&gt; Have those inputmode&apos;s been shipping in any implementations? If not, can we
&gt; strike them from the spec?

I&apos;m not sure. They are handled in Chromium [1] but in some ad-hoc testing I can&apos;t make them actually do anything. I&apos;ll ask the people who wrote the code.

[1] https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/render_widget.cc&amp;sq=package:chromium&amp;type=cs&amp;l=127&amp;rcl=1441754958</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123139</commentid>
    <comment_count>26</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-09 10:47:13 +0000</bug_when>
    <thetext>Chromium does not support inputmode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123149</commentid>
    <comment_count>27</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-09-10 08:44:34 +0000</bug_when>
    <thetext>(In reply to Mounir Lamouri from comment #26)
&gt; Chromium does not support inputmode.

I&apos;ve asked those who wrote the code linked in comment #25, and apparently there is some limited support for  &apos;kana&apos;, &apos;katakana&apos;, and &apos;full-width-latin&apos;, while all other modes &quot;turns the IME to keyboard-direct alphabet input mode&quot;.

In other words, with no real support for &apos;verbatim&apos;, &apos;latin-name&apos; and &apos;latin-prose&apos;, I see no strong reason for trying to define autocapitalize in terms of inputmode. We could probably remove the overlapping modes from inputmode. Or remove inputmode entirely, if there&apos;s no implementor interest.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123151</commentid>
    <comment_count>28</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-10 10:48:39 +0000</bug_when>
    <thetext>Note that my understanding is that the implementation is behind a flag on Windows.

Should we have an attribute for scripts/alphabets hinting?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123154</commentid>
    <comment_count>29</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2015-09-10 15:38:17 +0000</bug_when>
    <thetext>I suspect that &apos;inputmode&apos; is still useful.

I don&apos;t know enough to assert that &quot;kana&quot; and &quot;katakana&quot; modes are useful, but my impression is that they are.

Similarly I think that a &quot;numeric&quot; inputmode would be good (for things like zipcode and credit card numbers).

Of course, these things don&apos;t have to be implemented using inputmode, but I don&apos;t know of strong reasons not to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123170</commentid>
    <comment_count>30</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2015-09-11 10:28:36 +0000</bug_when>
    <thetext>I&apos;m not a big fan of mixing scripts/alphabets with inputmode. For example, what happens if I have a text field in which I would like my users to type a roman characters number like MDCCCCX instead of 1910. A more common use case might be arabic websites. Arabic has its own numeral charocters (1910 =&gt; ۱۹۱۰) but all the arab world knows and uses the hindu-arabic system we use in the latin alphabet. I can imagine that there would be cases where one set of characters would be prefer over the other?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129006</commentid>
    <comment_count>31</comment_count>
    <who name="J. S. Choi">js_choi</who>
    <bug_when>2017-12-08 22:10:34 +0000</bug_when>
    <thetext>Work on the autocapitalize attribute is now occurring at the WHATWG HTML GitHub repository (https://github.com/whatwg/html/pull/3273).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129007</commentid>
    <comment_count>32</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2017-12-08 22:13:46 +0000</bug_when>
    <thetext>Thanks J.S.! I&apos;ll mark this as moved to https://github.com/whatwg/html/pull/3273 then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>