技術メモ:imeモードoffは、どこかで使いたいと思っていた機能です。
1 |
<input name="test" type="text" style="ime-mode:disabled" /> |
#WIN+IE限定なので賛否ありそうですが、自分がFireFox派であっても
#大多数に有効なら良いんじゃないか?と常々思っています。
さて、ユーザビリティで必須を少し掘り下げて、アクセスキーもあると良いなぁ。
と思いつつも、相当なショートカットオタクですが、さすがにWebサイトまではやや冗長傾向(^^;
<input class=’radio’ type=’radio’ name=’sex’ id=’male’ value=’male’>
<label for=’male’ accesskey="M">男性(<u>M</u>)</label>
</input>
<br />
<input class=’radio’ type=’radio’ name=’sex’ id=’female’ value=’female’>
<label for=’female’ accesskey="F">女性(<u>F</u>)</label>
</input>
<br />
<br /><input class=’checkbox’ type=’checkbox’ name=’os[]’ id=’os_win’ value=’win’ onclick=” />
<label for=’os_win’ accesskey="W">Windows(<u>W</u>)</label>
<br />
<input class=’checkbox’ type=’checkbox’ name=’os[]’ id=’os_mac’ value=’mac’ onclick=” />
<label for=’os_mac’ accesskey="M">Macintosh(<u>M</u>)</label>
<br />
<input class=’checkbox’ type=’checkbox’ name=’os[]’ id=’os_linux’ value=’linux’ onclick=” />
<label for=’os_linux’ accesskey="L">Linux(<u>L</u>)</label>
◆サンプル
ALTキー(MacはCMDキー)+Mなどで、accesskey設定されたラベルがフォーカスされ、関連づけられたフォームのON/OFFになります。
FireFoxでは、フォームにフォーカスが移るのみで、ON/OFFはスペースキーが必要でした。
さらに、上記サンプルのようにMが重複していたりすると、
IE6.0・・・先に宣言されたほうが有効
FF1.5.10・・・後に宣言されたほうが有効
という違いもありました。
No comments yet. You should be kind and add one!
By submitting a comment you grant typista a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.