XHTML inputmode Attribute Module

inputmode 属性

[3] HTMLXFormsinputmode 属性は、 そのフォーム制御子に適当な入力モードヒントを指定します。

ここでいう入力モードは、 鍵盤の入力モード切替だったり、 IME の有効・無効だったり、 その他の設定だったりします。

[5] HTML 内容属性

状態
WHATWG WD
要素型
inputtextarea
type
textpasswordemailurltextarea
属性名
inputmode (input mode (入力モード) より)
属性値
既定値

仕様書

属性値

[9] 属性値は、字句空白で区切ったものです。 字句は、アルファベットの列か、 または絶対URIです。 大文字小文字は区別します。 XForms 1.0 E.1

URI かどうかは、 COLON の有無で判断できます。
何個の字句? 素片識別子? 順序?

[10] アルファベットだけの字句は、 XForms 1.0 (かその後継版) 仕様書で定義します。 XForms 1.0 E.1

[11] URI拡張可能性のために認められていますが、 XForms 1.0 では定義しません。 URI解参照するとその入力モード人間可読な説明が入手可能とするべきです。 それには、その入力モードと、 他の字句でどう修飾されるか、 またはどう修飾するかを説明するべきですXForms 1.0 E.1

[17] 字句は、意味的には用字系字句修飾子の2種類に分けられます。 スクリプト字句修飾子より前に配置するべきですXForms 1.0 E.3

レンダリング

[12] XForms 1.0 E.2

[13] 利用者エージェントは、 その環境で利用者が使用可能な状態となっているすべての入力モードを利用可能とするべきです。 通常は XForms で定義されている字句のうちのほんの一部だけです。 XForms 1.0 E.2

[14] 入力モードの決定に使う算法は次の通りです。 利用者エージェントは必ずしもこの算法を使う必要はありませんが、 同じように動作する必要があります。 この算法は必ずしも可能なすべての組合せについて正しそうな結果が得られるわけではありませんが、 よく使う組合せに対しては正しい結果が得られます。 XForms 1.0 E.2

  1. 利用可能なすべての入力モードを、 1つ以上の字句を使って表します。
  2. inputmode 属性値を前から後ろに走査します。
    • 字句 t について、
      • 利用可能な入力モード字句並び群の残りの中に、 t を含むものが無いか探します。
      • t を含むものがあれば、 t を含まない入力モードは除去します。
      • t を含むものがなければ、 t は無視します。
  3. 利用可能な入力モード字句並び群の残りが、

[15] どれも選択しないというのは、環境依存の既定値になるということ?

利用可能性

[7] 著者は、様々な装置で利用可能な値であることに配慮しつつ、 可能な限り inputmode 属性を提供するべきですXForms 1.0 E

歴史

XForms

[35] inputmode 属性XForms 1.0 で導入されました。

Web Forms 2.0 への追加

[6] Web Forms 2.0 で、 XForms 1.0inputmode と完全に等価として HTMLbackport されました。

XHTML Basic 1.1 への追加

[1] XHTML Basic 1.1 (Wed Mar 22 16:31:57 2006) http://htmlwg.mn.aptest.com/htmlwg/xhtml-basic/#s_inputmode

W3C HTML WGinputmodeXFormsからbackportするらしい。

それはいいとして、追加された章がXForms 1.0の附属書Eの丸写しだとか、 なぜかそのモジュールXHTML m12nか他の何かではなくXHTML Basicで定義されているとか、 やり方が相変わらずだww (名無しさん 2006-03-28 02:38:53 +00:00)

[39] 驚くべきことに勧告になりました。

[40] 実装報告はとてもぶっ飛んだ愉快なものでした。

  • 2件中1件は、テストが壊れていたので修正したら問題なかったと主張しています。
  • もう1件は、 XHTML Basic 1.1 に対応していないので XForms 1.0 に書き直したら問題なかったと主張しています。

[38] 後に XHTML 1.2 ED にも XHTML inputmode Attribute Module が採用されました。 同じく文書型の仕様書であるはずの XHTML Basic 1.1 を参照するという形でした。

HTML5 からの削除

[37] inputmode 属性Web Forms 2.0HTML5 への統合の際に属性名だけ掲載されました。

[34] しかしその後すぐ、 -wap-input-format が既によく実装されているとして HTML 5 から削除されました。

[16] 利用可能な入力モード

であるときに、選択される入力モードXForms 1.0 E.2:

inputmode 属性値選択される入力モード
cyrillic titlecyrillic
cyrillic lowerCasecyrillic lowerCase
lowerCase cyrilliccyrillic lowerCase
latin upperCaselatin
upperCase latincyrillic upperCase, user upperCase (両者が同じ場合; 同じでなければ該当なし)

[19]

入力欄inputmode
hiragana
フリガナkatakana
hiragana
フリガナkatakana
郵便番号latin digits
住所hiragana
住所 フリガナkatakana
電子メイルlatin lowerCase
電話番号latin digits
一言user predictOn

XForms 1.0 E.5

関連

[18] XML Schema パターン・ファセットとの関係

XForms では、 XML Schema データ型の定義でパターンファセットを使って入力可能な値を制限することができます。

XML Schemaパターンは、 確固たる制約であって、 入力値の途中の部分で入力できる文字を細かく指定できます。 inputmode は柔軟なヒントであって、 入力開始時の入力モードだけ指定できます。 この2つが両方用意されているのは:

XForms 1.0 E.4

メモ

[2] XFormsから既にですが、

hiraganaUnicode script name (may include other Japanese scripts produced by conversion from hiragana)

なのはどうにかなりますまいか?

[20]

[21] Weekly XHTML2 WG Teleconference -- 30 May 2007 (2007-06-08 21:49:05 +09:00 版) http://www.w3.org/2007/05/30-xhtml-minutes#basic (名無しさん)

[22] これ実装可能なんだろうか?? (名無しさん)

[23] OMA test fest stauts on inputmode (Yamakami, T. 著, 2007-06-06 01:09:54 +09:00 版) http://lists.w3.org/Archives/Public/public-xhtml2/2007Jun/0003.html (名無しさん 2007-06-16 01:08:14 +00:00)

[24] regrets to miss June 13 conf call and note about OMA input mode testing material (Yamakami, T. 著, 2007-06-13 12:35:57 +09:00 版) http://lists.w3.org/Archives/Public/public-xhtml2/2007Jun/0009.html (名無しさん 2007-06-16 01:08:45 +00:00)

[25] *DRAFT* W3 Forms F2F (Hawthorne) Day 1 June 13, 2007 (2007-06-26 18:29:00 +09:00 版) http://lists.w3.org/Archives/Public/public-forms/2007Jun/att-0034/2007jun13.html#topic17 (名無しさん)

[26] inputmode in XHTML 1.1 (Steven Pemberton 著, 2007-07-12 22:07:29 +09:00 版) http://lists.w3.org/Archives/Public/public-xhtml2/2007Jul/0016.html (名無しさん)

[27] >>26 XHTML BasicXHTML 1.1部分集合のはずだったが、 inputmode のせいでそうではなくなった、 ついては XHTML 1.1 にも inputmode を追加したい、ってあんたなにそれ? (名無しさん)

[28] XHTML 1.2 (2006-09-06 19:21:36 +09:00 版) http://testfest.openmobilealliance.org/xHTML_3c/Index.html (名無しさん)

[29] >>28 ここのテスト、 外部部分集合を読まない限り xmlns が含まれていないという罠。

[41] XForms 1.1 ( 版) http://www.w3.org/TR/2009/REC-xforms-20091020/#mode

[42] Web Applications 1.0 r7198 First pass at an inputmode= attribute based on actual research. This only handles Latin-script languages and Japanese, currently; if you want other languages supported, please e-mail the whatwg@whatwg.org mailing list with the relevant data. Wiki page: http://wiki.whatwg.org/wiki/Text_input_keyboard_mode_control]] ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7197&to=7198

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

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

[45] (9) Ian Hickson - Google+ - I need your help if you know anything about the needs of… ( ( 版)) https://plus.google.com/u/0/107429617152575897589/posts/WwVmKNjcZ4p

[46] InputMode - W3C XForms Group Wiki (Public) ( ( 版)) http://www.w3.org/MarkUp/Forms/wiki/InputMode

[47] Web Applications 1.0 r7201 drop half-width-katakana inputmode since it's not useful apparently ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7200&to=7201

[48] Web Applications 1.0 r7223 Add inputmode=latin-name; add some introductory material for autocomplete= and inputmode=; add inputmode= to the index; recommend against inputmode=email, tel, url. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7222&to=7223

[49] IRC logs: freenode / #whatwg / 20120726 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20120726#l-203

[50] IRC logs: freenode / #whatwg / 20121017 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121017#l-969

[51] 746142 – Add @inputmode to input element ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=746142

[52] [whatwg] inputmode attribute ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-June/039709.html

[53] [whatwg] inputmode feedback ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-June/039710.html

[54] inputmode attribute ( ((wrong string) 河内 隆仁 著, 版)) http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0841.html

[55] [whatwg] inputmode feedback ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-September/040849.html

[56] Web Applications 1.0 r8211 Allow inputmode= on type=password, so that you can set the input mode to numeric for PIN passwords]] ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8210&to=8211

[57] [whatwg] inputmode feedback ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-January/041902.html

[58] [whatwg] inputmode feedback ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-February/041982.html

[59] Web Applications 1.0 r8456 By request, an input mode for Japanese human name fields. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8455&to=8456

[8] Site Compatibility for Firefox 22 - Mozilla | MDN ( 版) https://developer.mozilla.org/en-US/Firefox/Releases/22/Site_compatibility#HTMLMediaElement.crossorigin_and_HTMLInputElement.inputmode_have_been_renamed

HTMLInputElement's inputmode property has also been renamed to inputMode to comply with the spec (note the capital letters).

[30] inputmode () https://rawgit.com/dtapuska/inputmode/master/index.html

[31] dtapuska/inputmode: Re-specing the inputmode attribute () https://github.com/dtapuska/inputmode

[32] inputmode () https://rawgit.com/dtapuska/inputmode/master/index.html

[33] Editorial: fix the link for Latin Prose in the description of the ful… (sudsj著, ) https://github.com/whatwg/html/commit/60e528de1dac2ff675a31237645e3fdd0cd556a3

[60] dtapuska/inputmode: Re-specing the inputmode attribute () https://github.com/dtapuska/inputmode

[61] Refine the inputmode attribute, and expose it on contenteditable (dtapuska著, ) https://github.com/whatwg/html/commit/d430f275f4e253956a5965c8b90885d3ac4e90c1

[62] Refine the inputmode attribute, and expose it on contenteditable (dtapuska著, ) https://github.com/whatwg/html/commit/d430f275f4e253956a5965c8b90885d3ac4e90c1

[63] Refine the inputmode attribute, and expose it on contenteditable (dtapuska著, ) https://github.com/whatwg/html/commit/d430f275f4e253956a5965c8b90885d3ac4e90c1

[64] Move inputmode to not be dependent on forms · Issue #1897 · whatwg/html () https://github.com/whatwg/html/issues/1897

[65] Remove inputmode · Issue #3077 · whatwg/html () https://github.com/whatwg/html/issues/3077

[66] dtapuska/inputmode: Re-specing the inputmode attribute () https://github.com/dtapuska/inputmode

[67] inputmode () https://rawgit.com/dtapuska/inputmode/master/index.html

[68] 28228 – Specify the autocapitalize attribute () https://www.w3.org/Bugs/Public/show_bug.cgi?id=28228

[69] Digit input type · Issue #1626 · whatwg/html () https://github.com/whatwg/html/issues/1626

[70] Refine the inputmode attribute, exposing it on contenteditable. by dtapuska · Pull Request #3260 · whatwg/html () https://github.com/whatwg/html/pull/3260

[71] Add autocapitalize attribute by rlanday · Pull Request #3273 · whatwg/html () https://github.com/whatwg/html/pull/3273

[72] Add the enterkeyhint="" attribute (dtapuska著, ) https://github.com/whatwg/html/commit/a5422d984d9b7b8a4e0ad7a0ad237b07f190cc93

[73] Fix inputmode="number" example typo to inputmode="numeric" (dtapuska著, ) https://github.com/whatwg/html/commit/1e5953c81276c734a23741e429efe812dc79d9d6

[74] Editorial: Replace inputmode="number" with inputmode="numeric" by dtapuska · Pull Request #4656 · whatwg/html () https://github.com/whatwg/html/pull/4656

[75] inputmode=number should be inputmode=numeric · Issue #4652 · whatwg/html () https://github.com/whatwg/html/issues/4652