-
Notifications
You must be signed in to change notification settings - Fork 4
/
940.txt
491 lines (378 loc) · 27.8 KB
/
940.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
[7] [DFN[[CODE(HTMLa)@en[[[accesskey]]]]]] [[属性]]は、
[[要素]]に[[キー操作]]を割り当てるものです。
いまいち使い勝手が悪く、あまり活用されていないようです。
* 仕様書
[REFS[
- [8] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2015-05-06 10:42:35 +09:00]] 版) <https://html.spec.whatwg.org/#assigning-keyboard-shortcuts>
]REFS]
* 意味
[59] [CODE(HTMLa)@en[[[accesskey]]]] [[属性]]の値は、
[[利用者エージェント]]が当該[[要素]]の[[活性化]]や[[焦点]]を当てるための[[キーボードショートカット]]を作成するための指針として使うものです [SRC[>>8]]。
[36] [CODE(HTMLa)@en[[[accesskey]]]] [[属性]]を使うと、
[[活性化]]したり[[焦点]]を当てたりできる[[要素]]に、
[[活性化]]のために打鍵するべき組み合わせ ([[キーボードショートカット]]) を設定できます [SRC[>>9]]。
;; [37] 実際の組み合わせは、[[利用者]]の[[鍵盤]]や[[プラットフォーム]]が利用済みの組み合わせ、
ページ中の他の割り当てなどを考慮して、[[利用者エージェント]]が決定します [SRC[>>9]]。
* 属性値
[60] [[属性値]]は、 [[ordered set of unique space-separated tokens]] でなければ[['''なりません''']] [SRC[>>8]]。
[[属性値]]には、色々な[[入力装置]]で[[キーボードショートカット]]が利用可能となるよう、
いくつも候補を指定できます [SRC[>>8]]。
[39] 各候補は、[[文字]]1つです [SRC[>>8]]。[[属性値]]として指定された[[集合]]の各要素は[[Unicode符号位置]]1つでなければ[['''なりません''']] [SRC[>>8]]。
[38] [[大文字]]と[[小文字]]は区別されます [SRC[>>8]]。
[11] 文字を入力するものでない鍵や複数の鍵の組合せを指定することはできません。
* 文脈
[43] [[HTML要素]]に指定できます [SRC[>>8]]。
[13] この[[属性]]は必須ではありません。省略した場合、特に[[キーボードショートカット]]の指定はないものと解釈されます。
* キーボードショートカットの割り当て
[67] [[要素]]の [DFN[[[assigned access key]]]] は、
[[要素]]の [CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]から求めた[[キー]]の組み合わせです
[SRC[>>8]]。
[68] 初期状態では[[要素]]は [[assigned access key]] を持っては[['''なりません''']] [SRC[>>8]]。
[69] [[要素]]の [CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]が設定、変更、
削除された時に次の処理を行わなければ[['''なりません''']] [SRC[>>8]]。
[FIG(steps)[
= [70] [CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]があれば、
== [71] [[属性値]]を[[間隔で分割]]します。
== [72] 分割結果について、指定順に、
=== [73] 値が[[Unicode符号位置]]1つでなければ、無視して次の値の処理に移ります。
=== [74] [[システム]]の[[鍵盤]]の[[キー]]に対応しない値なら、
無視して次の値の処理に移ります。
=== [75] 指定された値の[[キー]]と0個[[以上]]の[[修飾キー]]の組み合わせを使うことができるなら、
==== [76] それを [[assigned access key]] とします。ここで停止します。
= [77] [[利用者エージェント]]が適切な[[キー]]の組み合わせを選んで
[[assigned access key]] としても構いません。
= [78] [[assigned access key]] は無いものとします。
]FIG]
[79] [CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]が変更された時や[[要素]]が他の[[文書]]に移動された時を除き、
[[assigned access key]] を変更する[['''べきではありません''']] [SRC[>>8]]。
;; [92] [[文書へ挿入]]や[[文書から削除]]のタイミングで >>69 の処理を実行することは求められていません。
ということは[[節点]]の親子関係の変更では割り当てが変化しないことが期待されていることになります。
[[文書へ挿入]]されていない[[要素]]であっても [CODE(HTMLa)@en[[[accesskey]]]]
[[属性]]を持っていれば、他の[[要素]]がその[[キーボードショートカット]]を使えない可能性があることになります。
[91] 同じ [CODE(HTMLa)@en[[[accesskey]]]] の[[要素]]が複数あるとき、
どれが選ばれるべきか [[HTML Standard]] は規定していません。
[[利用者エージェント]]が場面に応じて適切に判断するべきなのだと思われます。
ただ一般に [[DOM]] への挿入順 ([[構文解析]]の場合は[[文書順]])
で >>69 の処理が実行されるはずですから、自然な実装は [[DOM]]
への挿入順が早いものが優先されると思われます。
[42] 本処理は、 [[fingerprinting vector]] です [SRC[>>8]]。
* キーボードショートカットの処理
[80] [[利用者]]が [[assigned access key]] に当たる[[キー]]の組み合わせを[[押下]]したら、
次のようにしなければ[['''なりません''']] [SRC[>>8]]。
[FIG(list)[
= [81] 次の条件をすべて満たす場合:
[FIG(list)[
- [83] [[要素]]が[[命令]]を定義していて、
- [84] [[命令]]の [[Hidden State]] [[facet]] が[[偽]]で、
- [85] [[命令]]の [[Disabled State]] [[facet]] が[[偽]]で、
- [86] [[要素]]が[[文書中]]にあり、
- [87] [[文書]]が[[閲覧文脈]]に関連付けられており、
- [88] [[要素]]および[[祖先]]に [CODE(HTMLa)@en[[[hidden]]]] [[属性]]が指定されていない
]FIG]
== [82] [[命令]]の [[Action]] を実行します。
]FIG]
;; [93] ただの[[焦点]]の移動ではなく、 [[命令]]の [[Action]] ですから、
[[焦点]]の移動の後[[クリック]]相当の動作がただちに発生します。
[96] 通常は、[[活性]]の[[閲覧文脈]]についてこの処理が行われます。
[[活性]]でなければ実行されません。
;; [97] [[入れ子閲覧文脈]]が選択されているときはその[[閲覧文脈]]、
[[最上位閲覧文脈]]が選択されているときはその[[閲覧文脈]]のみで、
親子は含まれないと思われます。例えば [CODE(HTMLa)@en[[[sandbox]]]]
[CODE(HTMLe)@en[[[iframe]]]] が[[親閲覧文脈]]の[[キーボードショートカット]]を上書きできてしまうと不都合です。
[40] [[利用者エージェント]]は[[キーボードショートカット]]の一覧を[[利用者]]に提供できます
[SRC[>>8]]。
[89] [[利用者エージェント]]は、他の方法で [CODE(HTMLa)@en[[[accesskey]]]] の[[要素]]を晒すこともできます。 [SRC[>>8]]
[EG[
[90] 例えば特定の[[キー]]の[[押下]]で表示される[[メニュー]]にそのような[[要素]]を示しても構いません [SRC[>>8]]。
]EG]
* アクセス可能性と利用可能性
[26]
この属性は、元々[[連結]]や[[フォーム]]の[[制御子]]などへの[[鍵盤]]など
[WEAK[([[鼠]]以外)]] への[[アクセス可能性]]や[[可用性]]を向上させることを目的に採り入れられました。
しかし、これまでに様々な問題があることが分かっており、
使い方によってはかえってアクセス可能性や可用性を低下させることになり兼ねません。
[27] '''実装と鍵盤の種類による差異''':
[[HTML]] [[利用者エージェント]]は様々な実装がありますし、
それを使用する[[環境]]も様々です。また、その環境で使用する[[鍵盤]]
[WEAK[(や同様の[[装置]])]] も実に様々です。
この様々な環境の従来の慣習や実現上の制限のため、 [[HTML]]
の仕様上は [CODE(HTMLa)[accesskey]]
属性値を実際にどういう打鍵の組合せに対応させるかを定めていません。
[CODE(HTMLa)[accesskey]] が [SAMP(char)[1]] であれば、
[KEY[1]] という鍵を押せば良いだけの実装もありますし、
[KEY[[[Ctrl]]]] と一緒に押す実装もあります。あるいは
[KEY[[[Alt]]]] と一緒に押させる実装もあります。
同じ [SAMP(char)[1]] でも、鍵盤本体と数字鍵盤で2つ鍵があって、
どちらかしか使えないという実装も、両方使えるという実装もあり得ます。
[[利用者]]が特定の実装にだけ慣れていれば問題ありませんが、
複数の実装を使っていると混乱の元です。
[[著者]]としても、 [CODE(HTMLa)[accesskey]]
があることとその使い方を説明しようにも、
考えられる方法を列挙するか特定の[[利用者エージェント]]に限って解説するかしかありません。
鍵盤の鍵の種類は鍵盤の種類によって様々です。
ある鍵盤に存在している鍵が他の鍵盤に存在するとは限りません。
また、打鍵のしやすさも鍵盤の配置によって変わりますから、
なんとも言えません。[[可用性]]を追求すると [[HTML]]
の装置非依存性が犠牲になります。 [CODE(HTMLa)[accesskey]]
に限ったことではありませんが、 [CODE(HTMLa)[accesskey]]
属性では特に重大な問題といえます。
[28] '''操作の統一''':
[CODE(HTMLa)[accesskey]] によってなされる操作はできるだけ文書を超えて統一されていることが望ましいと考えられます。
例えば、連続する文書群の次の文書へのリンクがある文書では
[CODE(char)[N]] で、別の文書では [CODE(char)[X]]
では[[利用者]]は不便で仕方がありません。
(この例の場合は [CODE(HTMLe)[[[link]]]] 要素で文書の関係を記述し、
[[利用者エージェント]]の機能で、または[[スタイル・シート]]で統一した
[CODE(HTMLa)[accesskey]] を与えるのが正しい解でしょう。)
統一するべきなのは文書間だけではなく、使用している[[利用者エージェント]]や[[オペレーティング・システム]]などの[[環境]]自体ともです。
しかし、これを[[文書]]の側で実現するのは困難です。
環境の鍵盤操作の方法は多種多様であります。特定の環境に合わせると、
別の環境での[[可用性]]が低下することもあり得ます。
[29] '''存在の明示''':
[CODE(HTMLa)[accesskey]] 属性が指定されていても、
それだけでは[[利用者]]はそのことを知り得ません。
何らかの方法で[[利用者]]に [CODE(HTMLa)[accesskey]]
が設定されており、それがどの鍵であるのかを伝える必要があります。
>>27 な以上、これは[[利用者エージェント]]の役目のはずですが、
これを上手く実現している利用者エージェントはあまりありません。
([[携帯電話]]の [[Webブラウザ]]では[[リンク]]の前に
[CODE(HTMLa)[accesskey]] に応じた鍵の絵が表示されるものもあります。)
[[著者]]の側で文書の一部として記述していることもありますが、
文章に上手く溶け込ませるのが難しかったり、[[言語]]によっては不可能だったりもします。
[66] 00年代には、本[[属性]]は[[アクセス可能性]]のために重要な機能であると盛んに宣伝されました。
それに踊らされた人達の中には、とにかくページ内の[[リンク]]や[[フォーム制御子]]に
[CODEU(HTMLa)@en[[[accesskey]]]] [[属性]]を設定してまわることが好ましいとして実践する人もいました。
しかし、無闇矢鱈に特定のページでしか使えない[[キーボードショートカット]]が沢山用意されても、
ほとんど意味が無いのは自明なことです。
* [CODE(DOMi)@en[HTMLElement]] インターフェイス [CODE(DOMa)@en[accessKey]] 属性
[95] [CODE(DOMi)@en[[[HTMLElement]]]] [[インターフェイス]]の
[DFN[[CODE(DOMa)@en[[[accessKey]]]]]] [[IDL属性]]は、
[CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]を [CODE(DOMi)@en[[[DOMString]]]]
として[[反映]]しなければ[['''なりません''']] [SRC[>>8]]。
* [CODE(DOMa)@en[accessKeyLabel]] IDL 属性
[94] [CODE(DOMi)@en[[[HTMLElement]]]] [[インターフェイス]]の
[DFN[[CODE(DOMa)@en[[[accessKeyLabel]]]]]] [[IDL属性]]は、
[[文脈オブジェクト]]の [[assigned access key]] を表す [CODE(IDL)@en[[[DOMString]]]]
を返さなければ[['''なりません''']]。無いときは、[[空文字列]]を返さなければ[['''なりません''']]。
[SRC[>>8]]
[41] [[著者]]は[[キーボードショートカット]]の一覧を[[利用者]]に提供することを[RUBYB[推奨]@en[encouraged]]されています [SRC[>>8]]。
[[利用者エージェント]]が実際に割り当てた[[キーボードショートカット]]は
[CODE(DOMa)@en[[[accessKeyLabel]]]] [[IDL属性]]により取得できます。 [SRC[>>8]]
* 歴史
** HTML4
[31] [CODE(HTMLa)@en[[[accesskey]]]] は、
([Q@en[accessibility key character]] ([Q[[[アクセス可能性]][[鍵]][[文字]]]])
の意と思われます。
[47] [CODE(HTMLa)@en[accesskey]] 属性を定義していた HTML 仕様書:
[REFS[
- [[HTML 4]] ([[Web Forms 1.0]])
-- [CITE[17.11.2 Access keys]]
<IW:HTML4:"interact/forms.html#access-keys">
- [[Web Forms 2.0]]
-- [CSECTION@en[2.5. Extensions to existing attributes]]
<IW:WF2:"#extensions0">
]REFS]
[9] [[HTML4]] + [[WF2]] では、
[CODE(HTMLe)[[[a]]]], [CODE(HTMLe)[[[area]]]],
[CODE(HTMLe)[[[button]]]], [CODE(HTMLe)[[[input]]]], [CODE(HTMLe)[[[label]]]],
[CODE(HTMLe)[[[legend]]]], [CODE(HTMLe)[[[textarea]]]],
[CODE(HTMLe)@en[[QN[[[select]]] [http://www.w3.org/1999/xhtml]]]]
の各 [[HTML要素]]で [CODE(HTMLa)@en[[[accesskey]]]] [[内容属性]]が使えることになっていました。
[10] この属性の値は [CODE(SGML)[%[[Character]]]] です。
[[SGML]] 的には [CODE(SGML)[[[CDATA]]]] です。
アクセス鍵は[[文書文字集合]]から何か1文字です。
大文字・小文字の区別に対しては中立です。 [SRC[HTML 4 17.11.2]]
[61] [Q[大文字・小文字の区別に中立]]というのも意味不明気味なのですが、
仕様書の記号の説明によれば、[Q[文書文字集合からの一文字]]は
[Q[大文字・小文字変換の対象ではない]]という意味なのだそうです。
多くのシステムはアクセス鍵の大文字・小文字を区別しませんが、
そのようなシステムと整合的な実装が適当なのか不適当なのか実装依存なのか、
もう少し説明が欲しいところです。
[12] 著者は、読者がアクセス鍵を指定する際の入力方法を考慮するべきです。
[SRC[HTML 4]] この注意は、
例えば多くの日本語環境で漢字をアクセス鍵としても実質的に意味を成さないようなことを指摘しているのでしょう。
また、歴史的に日本語用計算機・ソフトウェアでは仮名鍵盤によるアクセス鍵を使ったものもありましたが、
[SAMP(HTML)[accesskey="イ"]] のように指定したところで相互運用上の問題が発生することでしょう。
なお、 [CODE(HTMLa)[accesskey]] 値は文書文字集合、すなわち [[UCS]]
の1文字と定義されていますが、必ずしも UCS の[Q[[[文字]]]]と日常的、
あるいは1打鍵という意味での[Q[文字]]とは一致しません。
具体的には、[[結合文字]]などで望む1[Q[文字]]が1[Q[文字]]で指定できない虞があります。
これも >>11 とあわせて仕様の限界でしょう。
(といっても、実際にアクセス鍵として使われた実績がある文字ではおそらく問題はないと思われます。)
[33]
[CODE(HTMLa)@en[[[accesskey]]]] [[属性]]は、
[[Web Forms 2.0]] で [CODE(HTMLe)@en[[[select]]]]
[[要素]]にも追加され、
[[利用者エージェント]]は対応[['''して構いません''']]、
最低でも相当する [[DOM属性]]は ([[DOM]] を実装していれば)
実装[['''しなければなりません''']]、と規定されました
[SRC@en[WF2 2.5]]。
それ以前はなぜか [CODE(HTMLe)@en[[[select]]]]
[[要素]]には定義されていませんでした。
[34]
また、 [[Web Forms 2.0]] は [[HTML 4]]
で明記されていなかった、 [CODE(HTMLe)@en[[[label]]]]
[[要素]]における動作についても規定しています (>>32)。
[18] アクセス鍵の呼出しはシステムに依存します。
例えば、 [[Windows]] では、通常アクセス鍵と一緒に [KEY[[[Alt]]]]
鍵を押します。 [[Apple]] のシステムでは、通常アクセス鍵と一緒に
[KEY[[[Cmd]]]] 鍵を押します。
[SRC[HTML 4 17.11.2]]
[[携帯電話]]のブラウザでは、アクセス鍵だけを押す実装が普通です。
[19] アクセス鍵のレンダリングは UA 依存です。
著者はアクセス鍵を名札文に含めることが推奨されています。
UA はアクセス鍵の値を、その役割を強調しつつ他の文字と区別するような方法
(例: 下線) でレンダリングするべきです。 [SRC[HTML 4 17.11.2]]
[[Windows]] では例えば [SAMP[File]] でアクセス鍵が [SAMP(char)[F]]
なら [SAMP[''F''ile]] の [SAMP(char)[''F'']] だけ下線を引くという界面が標準的です。
仕様書はそのようにレンダリングするのがよろしいと言っているのでしょう。
もっとも、この方法は名札にアクセス鍵文字が含まれていないときには問題が起こります。
特に、[[ラテン文字]]を使わない時には大問題で、日本語版 Windows
では[SAMP[ファイル (''F'')]] のようなみっともない表記が採用されています。
このように、 HTML 文書のレンダリングに限った問題ではありませんが、
アクセス鍵を分かりやすく、見栄え良く伝える方法は整備されていません。
[20]
アクセス鍵を打鍵した時の挙動は、 UA によって異なることがあります。詳しくは[[焦点]]の説明をご覧ください。
[32]
[CODE(HTMLa)@en[[[accesskey]]]] [[属性]]が
[CODE(HTMLe)@en[[[label]]]] [[要素]]に対して与えられた場合、
その [CODE(HTMLe)@en[[[label]]]] が関連付けられている[[要素]]に直接
[CODE(HTMLa)@en[[[accesskey]]]] を与えた場合と同じように動作[['''しなければなりません''']]。
[SRC@en[WF2 2.5]]
[14] 要素に割当てられたアクセス鍵を押すと、[[焦点]]がその要素に与えられます。
要素に焦点が移った時の動作は要素に依存します。
例えば、利用者が [CODE(HTMLe)[[[a]]]] 要素によって定義される[[リンク]]を[[活性化]]したら、
通常はリンクをたどります。利用者がラジオ・ボタンを活性化したら、
利用者エージェントはラジオ・ボタンの値を変更します。
利用者が文章入力欄を活性化したら、入力を認めます。 [SRC[HTML 4 17.11.2]]
** XHTML2
[49] [[XHTML2]] の最初の[[作業原案]]で、[[ハイパーテキスト属性集成]]に属し、
実質すべての [[XHTML2]] [[要素]]で利用できるものとして規定されるようになりました [SRC[>>63]]。
[REFS[
- [63] [CITE@en[- XHTML Attribute Collections]] ([TIME[2002-08-06 00:20:43 +09:00]] 版) <http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-attribute-collections.html#adef_attribute-collections_accesskey>
]REFS]
[50] [[ハイパーテキスト属性集成]]に属しているのは、元々 [[HTML4]] で [CODE(HTMLe)@en[[[a]]]]
[[要素]]に [CODE(HTMLa)@en[[[accesskey]]]] [[属性]]が定義されており、その
[CODE(HTMLa)@en[[[href]]]] [[属性]]がすべての[[要素]]に拡張されたためと思われます。
[51] 第6次案で [CODE(HTMLa)@en[[[accesskey]]]] [[属性]]は削除され、代わりに [[QName]]
によって役割を指定する [CODE(HTMLa)@en[[[access]]]] [[属性]]が追加されています。
[62] その後 [CODE(HTMLa)@en[[[access]]]] [[属性]]は削除され、かわりに
[CODE(HTMLe)@en[[[access]]]] [[要素]]が追加されました。更にこの[[要素]]は単独の[[仕様書]]として出版されました。
[64] しかしこのいずれも (そして [[XHTML2]] も) 実装されることはありませんでした。
[[Webブラウザー]]開発者からも[[著者]]からも、ほとんど無視されていました。
;; [65] [CODE(HTMLe)@en[[[access]]]] の項を参照。
** HTML5
[48] [[HTML5]] への追加は実用上の問題 (環境によって利用可能な文字が異なること、
利用者が [CODE(HTMLa)@en[[[accesskey]]]] を発見する方法がないことなど) から先送りされ続けてきましたが、
2009年春の r3065 で追加されました。この時から [CODE(HTMLa)@en[[[accesskey]]]]
[[内容属性]]は[[大域属性]]となり、 [CODE(DOMa)@en[[[accessKey]]]] [[DOM属性]]は
[CODE(DOMi)@en[[[HTMLElement]]]] [[界面]]の[[属性]]となりました。[[属性値]]は
[[HTML4]] 時代の「1文字」から「1文字」の「[[間隔分離唯一字句順序集合]]」に改められました。
更に、 [CODE(DOMa)@en[[[accessKeyLabel]]]] [[DOM属性]]が追加されました。
* 例
[16] [CODE(HTMLe)[input]] 制御子にアクセス鍵を割当てる例
[SRC[HTML 4 17.11.2]]
[PRE(HTML)[
<FORM action="..." method="post">
<P>
<LABEL for="fuser" accesskey="U">
User Name
</LABEL>
<INPUT type="text" name="user" id="fuser">
</P>
</FORM>
]PRE]
アクセス鍵 [CODE(char)[U]] を打鍵すると、名札に関連付けられた入力欄に焦点が移ります。
[SRC[HTML 4 17.11.2]]
[17] リンクにアクセス鍵を割当てる例 [SRC[HTML 4 17.11.2]]
[PRE(HTML)[
<P><A accesskey="C"
rel="contents"
href="http://someplace.com/specification/contents.html">
Table of Contents</A>
]PRE]
打鍵すると目次に飛びます [SRC[HTML 4 17.11.2]]。
* メモ
- [1] ''Implement of accesskey in Opera 7 beta'' <http://dai.pekori.to/opera/o7/accesskey1>
- [3] ''みんな、accesskeyってどうしてる? tabindexは?(仮)'' <http://accesskey.aiiro.net/>: 2ch スレのまとめサイト
- [4] >>3 は消滅しちゃったらしい。残念。
- [2] ''HTML:accesskey と tabindex [flow] RC3.01'' <http://rappeler.cside.to/Memo/aceskey.html>
- [6] [WEAK[2004-01-31 04:20:10 +00:00]] ''>>2'': リンク切れ、移転先不詳。''HTML:accesskey と tabindex [flow] RC3.01'' <http://web.archive.org/web/20030605231840/http://rappeler.cside.to/Memo/aceskey.html>
- [5] ブラウザの方の話ですけど、同じ [CODE(HTMLa)[accesskey]] の要素が複数あって、そのうちのどれかが [CODE(HTMLe)[[[form]]]] control のときで、かつ現在その含まれる [CODE(HTMLe)[form]] 内の control が活性なら、その [CODE(HTMLe)[form]] 内の [CODE(HTMLa)[accesskey]] 要素が反応してくれると嬉しいと思いません? たとえば、一頁内に複数の [CODE(HTMLe)[form]] があって、どれも「提出」ボタンが [KBD[M-S]] で効いてくれると気持ちがいい。
[15] どうして [CODE(HTMLe)[[[fieldset]]]] ではなくて
[CODE(HTMLe)[[[legend]]]] に [CODE(HTMLa)[accesskey]] 属性があるのでしょうね?
[21]
>>3-4 その本スレ
[CITE[みんな、accesskeyってどうしてる? tabindexは?]] <http://pc.2ch.net/hp/kako/1006/10062/1006224399.html>
([[名無しさん]])
[22]
[CITE[フォームとアクセシビリティ -- ごく簡単なHTMLの説明]] <http://www.kanzaki.com/docs/html/htminfo33.html#kbd_navi>
([[名無しさん]])
[23]
[CITE[accesskey=key - アクセスキー]] <http://tohoho.wakusei.ne.jp/html/attr/accesskey.htm>
ラベルを使う時はラベルに [CODE(HTMLa)[accesskey]] を指定するのが[Q[作法]]だとしていますが、根拠が不明です。
([[名無しさん]])
[24]
[Q[ラベルを持つ入力コントロールの場合は、<label> で指定したラベルに accesskey を指定するのが作法のようです。]<http://tohoho.wakusei.ne.jp/html/attr/accesskey.htm>]
と書いてあります。
>>19 の規定を斜め読みして適当に解説しているとかいうことはまさかないとは思いますが。
([[名無しさん]])
[25]
HTML 4 DTD の注釈は [Q[accessibility key character]] と説明しています。
([[名無しさん]] [sage])
[30]
[[フォーム]][[制御子]]の場合近くの
(現在[[焦点]]がある[[制御子]]と同じ[[フォーム]]の)
ものを選んでくれるようになっていると一頁内に複数の[[フォーム]]がある時に便利なのに、
と思ったりすることもあります。
([[名無しさん]])
[35]
[CITE[HTML5 IRC logs: w3c / #html-wg / 20070417]] ([CODE[2007-04-22 17:06:56 +09:00]] 版) <http://krijnhoetmer.nl/irc-logs/html-wg/20070417#l-177>
([[名無しさん]] [WEAK[2007-04-22 09:24:44 +00:00]])
[44]
[CITE@en[[CODE(HTMLa)@en[accesskey]] is broken]] ([[わかば]] 著, [TIME[2007-07-01 23:04:51 +09:00]] 版) <http://suika.fam.cx/~wakaba/d/d200707#d1-1>
([[名無しさん]] [WEAK[2007-07-01 14:06:14 +00:00]])
[45] [CITE[The SMIL 3.0 Linking Modules]] ([TIME[2008-12-02 00:45:09 +09:00]] 版) <http://www.w3.org/TR/2008/REC-SMIL3-20081201/smil-extended-linking.html#adef-accesskey>
[46] [CITE[Webサービスにおけるショートカットキーの原則 - TRANS '''['''hatena''']''']] ([TIME[2008-12-23 22:17:47 +09:00]] 版) <http://d.hatena.ne.jp/aratako0/20081223/p1>
[52] [CITE[IRC logs: freenode / #whatwg / 20090502]]
([TIME[2009-08-03 08:03:50 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20090502#l-489>
[53] [CITE['''['''whatwg''']''' accesskey=""]]
([TIME[2009-09-27 15:39:53 +09:00]] 版)
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-May/019579.html>
[54] [CITE@ja[コラム|【第10回】「カート」へのアクセスキーは何番?]]
( ([TIME[2010-10-22 15:56:12 +09:00]] 版))
<http://mobileredesign.jp/column10.html>
[55] [CITE@en[583533 – Implement AccessKeyLabel attribute]]
( ([TIME[2013-10-25 10:38:22 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=583533>
[56] [CITE@en-US[Global attributes - HTML | MDN]]
( ([TIME[2013-09-30 19:31:11 +09:00]] 版))
<https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes?redirectlocale=en-US&redirectslug=HTML%2FGlobal_attributes#accesskey>
[57] [CITE[Bug 72715 – Implement AccessKeyLabel attribute.]]
( ([TIME[2013-10-25 10:58:15 +09:00]] 版))
<https://bugs.webkit.org/show_bug.cgi?id=72715>
[58] [CITE[IRC logs: freenode / #whatwg / 20140713]]
( ([TIME[2014-07-14 14:12:04 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140713>
[98] [CITE@en[UIA: Remove the limitation on accesskey mapping (#125)]]
([[boggydigital]]著, [TIME[2018-03-05 06:47:55 +09:00]])
<https://github.com/w3c/html-aam/commit/76ae0290af58e40101825c4284ca0ac729f41973>
[99] [CITE@en[UIA: Remove the limitation on accesskey mapping by boggydigital · Pull Request #125 · w3c/html-aam]]
([TIME[2018-05-08 21:47:55 +09:00]])
<https://github.com/w3c/html-aam/pull/125>
[100] [CITE@en[Remove HTMLElement.prototype.accessKeyLabel? · Issue #838 · whatwg/html]]
([TIME[2018-08-05 01:13:41 +09:00]])
<https://github.com/whatwg/html/issues/838>
[101] [CITE@en[accessKeyLabel is only implemented in Firefox? · Issue #3770 · whatwg/html]]
([TIME[2018-08-05 01:14:03 +09:00]])
<https://github.com/whatwg/html/issues/3770>
[FIG(quote)[
[FIGCAPTION[
[102] [CITE[XSS in hidden input fields | Blog]]
([TIME[2018-09-11 13:26:23 +09:00]])
<https://portswigger.net/blog/xss-in-hidden-input-fields>
]FIGCAPTION]
> On Firefox Windows/Linux the key combination is ALT+SHIFT+X and on OS X it is CTRL+ALT+X. You can specify a different key combination using a different key in the access key attribute. Here is the vector:
> <input type="hidden" accesskey="X" onclick="alert(1)">
]FIG]