クリック前活性化手順

活性化動作 (DOM)

[1] (かっ) (せい) () (どう) () (activation behavior) は、 要素クリックによって最終的に呼び出されると規定されている動作のことです。

[36] 例えば a 要素は、 ハイパーリンクをたどるのが活性化動作です。

仕様書

活性化の手順

[12] イベント対象は、その種類と状態に応じて、 活性化動作 (activation behavior) (旧クリック後活性化手順 (post-click activation steps) )、 遺物活性化前動作 (legacy-pre-activation behavior) (旧クリック前活性化手順 (pre-click activation steps) )、 遺物被取消活性化動作 (legacy-canceled-activation behavior) (旧取り消しされた活性化の手順 (canceled activation steps) ) が定義されていることがあります >>26, >>8

[15] 次の要素には、活性化動作が定義されている、または状態によっては定義されます。

[16] <input type=range>日時選択の制御子のボタンや、 select 要素のボタン、 CSS スクロールバーなどの動作は活性化動作とはされていません。

[14] 遺物活性化前動作および遺物被取消活性化動作は、次の要素で定義されています。

これらの要素では、 click イベントの直前に状態が変更され、 click イベント取り消しされると元の状態に戻されます。

[31] 関連して、 focusing steps が実行されることがあります。


[21] 活性化動作には、マウスの状態だけでなく、鍵盤の状態も影響するかもしれません。

[22] 例えばハイパーリンクでのクリックフォーム提出ボタンクリックは、 Shift 押下中なら新しいでの navigate となります。

活性化の手順の呼び出し

[13] クリックなどによって要素活性化されると、 活性化の各手順が呼び出されます (クリックを参照)。 活性化動作取り消しされた活性化の手順は、 click イベント取り消しされたかどうかにより、片方のみ実行されます。

[9] 利用者エージェントは、利用者要素活性化動作を手動で呼び出す (trigger) 方法を用意するべきです >>8

[10] 例えば鍵盤入力、音声入力、マウスクリックのような方法で活性化動作を指示するような実装が可能です >>8

[11] クリックおよびそれ以外の活性化動作が指定された時の動作については、 クリックも参照。

要素の活性化の状態

[18] 要素は、その種類だけでなく、状態によっても活性化動作を持つかどうかが変化することもあります。

>>14>>15 の各項を参照。

[17] ある要素活性化動作を持つかどうかは、どの要素活性化動作が実行されるか (>>6)、フォームが暗示的に提出できるか (既定ボタン参照)、 :active が適用されるタイミング、 input 要素フォーカスに紐付くイベント発火タイミングに影響します。

[6] ある要素直近活性化可能要素 (nearest activatable element) とは、 その要素またはその祖先活性化動作が定義されている要素であって、 直近のものです。存在しないこともあります。 >>5 真正クリック活性化手順では、活性化動作の実行対象が直近活性化可能要素により決定されます。

[7] ある要素形式的活性化状態にある (in a formal activation state) とは、 利用者が当該要素活性化動作実行 (trigger) する意思を示し始めた時点から、 利用者がその意思を示し終える時点と活性化動作が実行し終わる時点のいずれか早い方までの間をいいます >>18

関連

[19] 活性化動作を実行させる状態にあることを擬似クラス :active が表しています。

[20] 活性化その他の目的のために要素が選択されている状態になっていることを焦点を持っているといいます。

歴史

[3] Web Applications 1.0 r7004 Fix 'activation behavior' definitions for form controls so that .click() doesn't do anything on them if they're disabled; fix definition of default submit buttons so that they are more predictable; unhide some v2COMMAND text that is now applicable again ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7003&to=7004

[4] Web Applications 1.0 r8453 Move activation stuff from the part of the spec that talks about elements to the part of the spec that talks about user interaction ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8452&to=8453

[23] Remove the activation behavior of media elements · whatwg/html@c649b7f ( 版) https://github.com/whatwg/html/commit/c649b7f1bcebc1e8effdc063ec4a85a782b5fd63

[24] Define special dispatch behavior for click events (annevk著, ) https://github.com/whatwg/dom/commit/cb12fd4e2db68a9d86841a13a73611e16f9f1fb4

[25] Editorial: rename activation-behavior-related algorithms (annevk著, ) https://github.com/whatwg/dom/commit/82692b9bebfb94b948d3f7593da05ea7c1e23ffc

[27] Align activation behavior with changes to DOM Standard (annevk著, ) https://github.com/whatwg/html/commit/7beb920ba2e1a71246b81d86005f223a0d7ac8ab

[28] Remove tabindex's synthetic click event feature (annevk著, ) https://github.com/whatwg/html/commit/35e3e1ec556de58da08d928ee033b7d10e91d1b9

[29] Please add two clarification · Issue #3466 · whatwg/html () https://github.com/whatwg/html/issues/3466

[30] Handle delegates focus in the focusing steps (rakina著, ) https://github.com/whatwg/html/commit/133607f19d5bd4e554c2106f36ee70c6a67cbb5d

[32] Explain label activation behavior + custom elements (domenic, , ) https://github.com/whatwg/html/commit/836294cbb6c7a9e0364293a29b308afd5eee1eba

[33] Activation behavior of label elements pointing to form-associated custom elements · Issue #5009 · whatwg/html () https://github.com/whatwg/html/issues/5009

[34] Explain label activation behavior + custom elements by domenic · Pull Request #5021 · whatwg/html () https://github.com/whatwg/html/pull/5021

[35] Revamp the user activation model (mustaqahmed, , ) https://github.com/whatwg/html/commit/8f8c1f50158736b3cf16188377a0974a20367c8b