Acceptance type of form tag newly added. Got more HTML-valid a bit.
New tag type: acceptance
A tag with acceptance type generates a checkbox with some JavaScript gimmick. You can use it as a test confirming if the sender has accepted specific terms.
Example
[acceptance foo]Check this if you want to send.
By default, submit buttons in the form are enabled when the acceptance checkbox is checked.
Disabled when not checked.
With invert option, this rule is inverted. Submit buttons are enabled when you uncheck it and disalbed when you check it.
Example
[acceptance bar invert]Uncheck this if you want to send.
You can use multiple acceptances in the same form.
More valid
I fixed some HTML-invalid codes.
- Add
altattribute to<img /> - Add
colsandrowsattribute to<textarea> - Add
sizeattribute to<input type="text" />
The last one is not for HTML-valid, it’s for users who claims default size of text input field is too small. The default size now is 40, in most of browsers it’s larger than before.
If you still have HTML-invalid codes not yet fixed, please let me know.
(In Japanese from here.)
acceptance タイプのフォーム用タグが新たに追加されました。HTML の仕様に反していた部分を少し修正しました。
新しいタグ: acceptance
acceptance タイプのタグは JavaScript の仕掛けが組み込まれたチェックボックスを生成します。送信者が特定の条項を承諾したかどうかを確認するために使えます。
例
[acceptance foo]Check this if you want to send.
デフォルトでは、フォームの送信ボタンは acceptance のチェックボックスがチェックされている場合に有効になります。
そしてチェックボックスがチェックされていない場合は無効になります。
invert オプションをつけることでこのルールを反転させることができます。この場合、送信ボタンはチェックされている場合に無効で、チェックされていない場合に有効です。
例
[acceptance bar invert]Uncheck this if you want to send.
同じフォームの中で複数の acceptance を組み合わせて使うことも可能です。
HTML をより正しく
いくつか HTML の仕様に反していた部分を修正しました。
<img />にalt属性を追加<textarea>にcolsとrows属性を追加<input type="text" />にsize属性を追加
最後のは HTML 仕様に従うためというよりは、デフォルトのテキストフィールドのサイズが小さすぎるというユーザの声に応えての変更です。デフォルトで size="40" になったのでたいていのブラウザでは前より大きくなっているはずです。