HTML — フォーム用の要素

【この訳に特有な表記規約】

◎表記記号

4.10.1. 序論

【 この節の内容は、 `別~page@HTML-forms-intro-ja.html#introduction-4$にて。 】

4.10.2. 分類

この節における各種~要素は、 `~flow内容$, `句ng内容$, `対話的~内容$などの通例の分類に加えて,いくつかの重なり合う(が、微妙に異なる)分類に仕分けられる — その重なりは、 ほぼ歴史的な理由によるものであるが。 ◎ Mostly for historical reasons, elements in this section fall into several overlapping (but subtly different) categories in addition to the usual ones like flow content, phrasing content, and interactive content.

次に挙げる要素は、 `~formに所有され得る要素@ とされ,ある~formに`所有され$得ることを意味する ⇒# `button$e, `fieldset$e, `input$e, `object$e, `output$e, `select$e, `textarea$e, `img$e, `~formに所有され得る~custom要素$ ◎ A number of the elements are form-associated elements, which means they can have a form owner. • buttonfieldsetinputobjectoutputselecttextareaimgform-associated custom elements

`~formに所有され得る要素$は、 更にいくつかに分類される: ◎ The form-associated elements fall into several subcategories:

`~listされる@ 要素 ◎ Listed elements
次に挙げる要素は、[ `form.elements$m / `fieldset.elements$m ]~API内に~listされる。 これらの要素には、 作者が`~form所有者$を明示的に指定できるようにする,[ `form$a 内容~属性と対応する `form$m ~IDL属性 ]がある ⇒# `button$e, `fieldset$e, `input$e, `object$e, `output$e, `select$e, `textarea$e, `~formに所有され得る~custom要素$ ◎ Denotes elements that are listed in the form.elements and fieldset.elements APIs. These elements also have a form content attribute, and a matching form IDL attribute, that allow authors to specify an explicit form owner. • buttonfieldsetinputobjectoutputselecttextareaform-associated custom elements
`提出-可能@ な要素 ◎ Submittable elements
次に挙げる要素は、 `form$e 要素を`提出する@~HTMLforms#concept-form-submit$ために`~entry~listを構築する$ときに利用され得る ⇒# `button$e, `input$e, `select$e, `textarea$e, `~formに所有され得る~custom要素$ ◎ Denotes elements that can be used for constructing the entry list when a form element is submitted. • buttoninputselecttextareaform-associated custom elements
`提出-可能$な要素には、 その属性に依存して `~button@ になるものもある。 要素がいつ~buttonになるかは、 関連な節の注釈文にて定義される。 ~buttonには、 特定的に `提出-~button@ になるものもある。 ◎ Some submittable elements can be, depending on their attributes, buttons. The prose below defines when an element is a button. Some buttons are specifically submit buttons.
`再設定-可能@ な要素 ◎ Resettable elements
次に挙げる要素は、 `form$e 要素が`再設定される$ときに影響され得る ⇒# `input$e, `output$e, `select$e, `textarea$e, `~formに所有され得る~custom要素$ ◎ Denotes elements that can be affected when a form element is reset. • inputoutputselecttextareaform-associated custom elements
`自動頭字化-を継承-@ する要素 ◎ Autocapitalize-inheriting elements
次に挙げる要素は、 `~form所有者$から `autocapitalize$a 属性を継承する ⇒# `button$e, `fieldset$e, `input$e, `output$e, `select$e, `textarea$e ◎ Denotes elements that inherit the autocapitalize attribute from their form owner. • buttonfieldsetinputoutputselecttextarea

`~formに所有され得る要素$に限らず,一部の要素は、 `~label可能@ な要素に分類される。 これらは、 `label$e 要素に結び付け得る要素である ⇒# `button$e, `input$e ( `type$a 属性が `Hidden$st 状態`でないもの^emに限る) `meter$e, `output$e, `progress$e, `select$e, `textarea$e, `~formに所有され得る~custom要素$ ◎ Some elements, not all of them form-associated, are categorized as labelable elements. These are elements that can be associated with a label element. • buttoninput (if the type attribute is not in the Hidden state)meteroutputprogressselecttextareaform-associated custom elements

【 上述した分類の要約(最後の行 `x-custom^e は、 `~formに所有され得る~custom要素$) 】
要素 `所有され得る@#form-associated-element$ `~listされる$ `提出-可能$ `再設定-可能$ `自動頭字化-を継承-$ `~label可能$

4.10.3. ``form^e 要素

`分類$
`~flow内容$ / `可触~内容$ ◎ Flow content. ◎ Palpable content.
`この要素を利用できる文脈$
`~flow内容$が期待される所。 ◎ Where flow content is expected.
`内容~model$
`~flow内容$ — ただし,子孫に `form$e 要素は無いとする。 ◎ Flow content, but with no form element descendants.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$。 ◎ Global attributes
``accept-charset$a — `~form提出$用に利用する文字~符号化法。 ◎ accept-charset — Character encodings to use for form submission
`action$a — `~form提出$用に利用する`~URL$ ◎ action — URL to use for form submission
``autocomplete$a — この~form内の各~controlにおける既定の~autofill特能を設定する。 ◎ autocomplete — Default setting for autofill feature for controls in the form
`enctype$a — `~form提出$用に利用する`~entry~list$用の符号化法の種別。 ◎ enctype — Entry list encoding type to use for form submission
`method$a — `~form提出$用に利用する~method(等)。 ◎ method — Variant to use for form submission
``name$a — `document.forms$m ~APIにおいて利用する~formの名前。 ◎ name — Name of form to use in the document.forms API
`novalidate$a — `~form提出$に際し,~form~control検証を迂回する。 ◎ novalidate — Bypass form control validation for form submission
`target$a — `~form提出$用の 【それにより~navigateされる】 `~navigable$。 ◎ target — Navigable for form submission
``rel$a — 【何も述べられていない】
`~accessibilityの考慮点$
`form$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window,
 `LegacyOverrideBuiltIns$,
 `LegacyUnenumerableNamedProperties$]
interface `HTMLFormElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute DOMString ``acceptCharset$m;
  [`CEReactions$] attribute USVString `action$m;
  [`CEReactions$] attribute DOMString ``autocomplete$m;
  [`CEReactions$] attribute DOMString `enctype$m;
  [`CEReactions$] attribute DOMString `encoding$m;
  [`CEReactions$] attribute DOMString `method$m;
  [`CEReactions$] attribute DOMString ``name$m;
  [`CEReactions$] attribute boolean `noValidate$m;
  [`CEReactions$] attribute DOMString `target$m;
  [`CEReactions$] attribute DOMString ``rel$m;
  [SameObject, PutForwards=`value$m] readonly attribute DOMTokenList ``relList$m;

  [SameObject] readonly attribute `HTMLFormControlsCollection$I ``elements$m;
  readonly attribute unsigned long ``length$m;
  ``getter$m `Element$I (unsigned long %index);
  ``~getterN$m (`RadioNodeList$I or `Element$I) (DOMString %name);

  undefined ``submit$m();
  undefined ``requestSubmit$m(optional `HTMLElement$I? %submitter = null);
  [`CEReactions$] undefined ``reset$m();
  boolean ``checkValidity$m();
  boolean ``reportValidity$m();
};

`form$e 要素は、[ `~formに所有され得る要素$たちからなる~collection ]を通して操作できる`~hyperlink$を`表現-$する — その中に、 編集-可能な値を表現し,処理~用に~serverへ提出され得るものも含ませ得るような。 ◎ The form element represents a hyperlink that can be manipulated through a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing.

``accept-charset@a 属性は、 提出に利用されることになる文字~符号化法を与える。 この属性に指定する値は、 `~ASCII大小無視$で `UTF-8^l に合致しなければナラナイ。 `ENCODING$r ◎ The accept-charset attribute gives the character encodings that are to be used for the submission. If specified, the value must be an ASCII case-insensitive match for "UTF-8". [ENCODING]

``name@a 属性は、 `forms$m ~collectionの中における当の `form$e 要素の名前を表現する。 この属性に指定する値は、[ `forms$m ~collection内の `form$e 要素たちの間で一意, かつ空でない文字列 ]でなければナラナイ。 ◎ The name attribute represents the form's name within the forms collection. The value must not be the empty string, and the value must be unique amongst the form elements in the forms collection that it is in, if any.

``autocomplete@a 属性は,`列挙d属性$であり、 次に挙げる~keyword, とり得る状態, それらの対応付けが定義される: ◎ The autocomplete attribute is an enumerated attribute with the following keywords and states:

~keyword 状態 概略的な記述
``on@v `on@st 各~form~controlの`~autofill欄~名$は、 既定では `on$v に設定される。
``off@v `off@st 各~form~controlの`~autofill欄~名$は、 既定では `off$v に設定される。
◎ Keyword|State|Brief description on|on|Form controls will have their autofill field name set to "on" by default. off|off|Form controls will have their autofill field name set to "off" by default.

この属性の[ `欠落~値~用の既定の状態$/`妥当でない値~用の既定の状態$ ]は、 `on$st とする。 ◎ The attribute's missing value default and invalid value default are both the on state.

`~form提出用の属性$として、[ `action$a, `enctype$a, `method$a, `novalidate$a, `target$a ]属性もある。 ◎ The action, enctype, method, novalidate, and target attributes are attributes for form submission.

`form$e 要素の ``rel@a 属性は、 要素が作成する~linkの種類を制御する。 属性の値は、 `~space等で分離された~token集合$(一意)でなければナラナイ。 許容される~keyword, それらの意味は、 `§ ~HTML~link型$に定義される。 ◎ The rel attribute on form elements controls what kinds of links the elements create. The attribute's value must be a unordered set of unique space-separated tokens. The allowed keywords and their meanings are defined in an earlier section.

``rel$a が`~supportする~token集合$tLは、 `§ ~HTML~link型$に定義される~keywordのうち[ `form$e 要素~上に許容される,かつ 処理~modelに影響iする,かつ ~UAが~supportする ]ものである。 この~token集合にアリな~keywordは,[ `noreferrer$v, `noopener$v, `opener$v ]であり、 ``rel$a が`~supportする~token集合$tLは,[ これらの~tokenのうち,~UAが それ用の処理~modelを実装するもの ]のみを含むモノトスル。 ◎ rel's supported tokens are the keywords defined in HTML link types which are allowed on form elements, impact the processing model, and are supported by the user agent. The possible supported tokens are noreferrer, noopener, and opener. rel's supported tokens must only include the tokens from this list that the user agent implements the processing model for.

%form.``elements$m
この~form内の~form~controlたちからなる `HTMLFormControlsCollection$I を返す。 (ただし、 歴史的な理由から,画像~buttonは除外される)。 ◎ Returns an HTMLFormControlsCollection of the form controls in the form (excluding image buttons for historical reasons).
%form.``length$m
この~form内の~form~controlの個数を返す(ただし、 歴史的な理由から,画像~buttonは除外される)。 ◎ Returns the number of form controls in the form (excluding image buttons for historical reasons).
%form[%index]
この~form内の %~index 番の要素を返す(ただし、 歴史的な理由から,画像~buttonは除外される)。 ◎ Returns the indexth element in the form (excluding image buttons for historical reasons).
%form[%name]

この~form内の所与の `~ID$ または `name$a を伴う ~form~controlを返す — ただし:

  • 複数ある場合、 それらの~form~controlからなる `RadioNodeList$I を返す。
  • 歴史的な理由から、 画像~buttonは除外される。
  • 該当するものが無い場合、 所与の~IDを有する `img$e 要素を返す。
◎ Returns the form control (or, if there are several, a RadioNodeList of the form controls) in the form with the given ID or name (excluding image buttons for historical reasons); or, if there are none, returns the img element with the given ID.
要素が 特定0の名前を利用して 一度でも参照されたなら、 その名前は,この~methodにて その要素を参照する仕方として 可用であり続けることになる — 要素の実際[ `~ID$ / `name$a ]が変化しても,要素が同じ`~tree$内にあり続ける限り。 ◎ Once an element has been referenced using a particular name, that name will continue being available as a way to reference that element in this method, even if the element's actual ID or name changes, for as long as the element remains in the tree.
合致する~itemが複数のある場合、 それらの要素すべてを包含する `RadioNodeList$I ~objが返される。 ◎ If there are multiple matching items, then a RadioNodeList object containing all those elements is returned.
%form.``submit()$m
この~formを提出する — が、 次はしない ⇒ `拘束を対話的に検証する$/ `submit$et ~eventを発火する ◎ Submits the form, bypassing interactive constraint validation and without firing a submit event.
%form.``requestSubmit( [ submitter ] )$m
この~formを提出するよう要請する。 ``submit()$m と違って、 この~methodは[ `拘束を対話的に検証する$ / `submit$et ~eventを発火する ]ことも含む — どちらも提出を取消せる。 ◎ Requests to submit the form. Unlike submit(), this method includes interactive constraint validation and firing a submit event, either of which can cancel submission.
%submitter 引数を利用して特定の`提出-~button$を指せる — その[ `formaction$a / `formenctype$a / `formmethod$a / `formnovalidate$a / `formtarget$a ]属性は、 提出に影響iし得る。 加えて、 %submitter は,提出~用に`~entry~listを構築する$ときに含まれることになるが、 通常は,~buttonは除外される。 ◎ The submitter argument can be used to point to a specific submit button, whose formaction, formenctype, formmethod, formnovalidate, and formtarget attributes can impact submission. Additionally, the submitter will be included when constructing the entry list for submission; normally, buttons are excluded.
%form.``reset()$m
この~formを再設定する。 ◎ Resets the form.
%form.``checkValidity()$m
この~formに属する~controlがすべて妥当~ならば ~T を返す。 他の場合は ~F を返す。 ◎ Returns true if the form's controls are all valid; otherwise, returns false.
%form.``reportValidity()$m
この~formに属する~controlがすべて妥当~ならば ~T を返す。 他の場合は ~F を返すことに加え,そのことを利用者に伝える。 ◎ Returns true if the form's controls are all valid; otherwise, returns false and informs the user.

``autocomplete@m ~IDL属性は、 `既知な値のみに制限され$る下で, ``autocomplete$a 内容~属性を`反映する$モノトスル。 ◎ The autocomplete IDL attribute must reflect the content attribute of the same name, limited to only known values.

``name@m ~IDL属性は、 ``name$a 内容~属性を`反映する$モノトスル。

``rel@m ~IDL属性は、 ``rel$a 内容~属性を`反映する$モノトスル。

◎ The name and rel IDL attributes must reflect the content attribute of the same name.

``acceptCharset@m ~IDL属性は、 ``accept-charset$a 内容~属性を`反映する$モノトスル。 ◎ The acceptCharset IDL attribute must reflect the accept-charset content attribute.

``relList@m ~IDL属性は、 ``rel$a 内容~属性を`反映する$モノトスル。 ◎ The relList IDL attribute must reflect the rel content attribute.


``elements@m 取得子~手続きは ⇒ ~RET 次のようにされた `HTMLFormControlsCollection$I ⇒ 根 ~SET コレの`根$,
~filterは[ コレに`所有され$ている, かつ`~listされる$要素のうち,次に該当しないもの ]に合致する ⇒ `input$e 要素のうち,[ `type$a 属性の状態 ~EQ `Image$st ]であるもの(これは、 歴史的な理由から除外されている) ◎ The elements IDL attribute must return an HTMLFormControlsCollection rooted at the form element's root, whose filter matches listed elements whose form owner is the form element, with the exception of input elements whose type attribute is in the Image Button state, which must, for historical reasons, be excluded from this particular collection.
``length@m 取得子~手続きは ⇒ ~RET コレの ``elements$m が成す`~collectionにより表現され$る~nodeの個数 ◎ The length IDL attribute must return the number of nodes represented by the elements collection.

``getter@m における`有index~prop取得子$の挙動は、 コレの ``elements$m ~collection %C に基づく: ◎ ↓

``~getterN@m における`有名~prop取得子$の挙動は、 以下に与える `form$e 要素~用の[ ~supportする~prop名/ 有名~propの値を決定する手続き ]に従う。 ◎ ↓


各 `form$e 要素は、 名前をある要素に対応付ける `過去~名~map@ を有する。 それは、 各~controlの名前を,その名前が変更されても持続するために利用される。 ◎ Each form element has a mapping of names to elements called the past names map. It is used to persist names of controls even when they change names.

`form$e 要素 %F が`~supportする~prop名$は、 次を走らせて得される: ◎ The supported property names consist of the names obtained from the following algorithm, in the order obtained from this algorithm:

  1. %~tuple群 ~LET 空~list — この~listを成す各~entryは、 次の~tupleになる ⇒ ( 名前, 要素, ~source ~IN { `id^i, `name^i, `過去^i }, 齢 ) 【~sourceは、何がこの~entryの~sourceであるかを指示する】 ◎ Let sourced names be an initially empty ordered list of tuples consisting of a string, an element, a source, where the source is either id, name, or past, and, if the source is past, an age.
  2. %候補~群 ~LET %F に`所有され$ている要素のうち, ~OR↓ を満たすものたちが成す集合:

    • `~listされる$要素であって,次を満たさないもの ⇒ `input$e 要素であって,その `type$a 属性の状態 ~EQ `Image$st
    • `img$e 要素である
    ◎ ↓
  3. %候補~群 を成す ~EACH( %候補 ) に対し【この時点では、順序は有意でない】:

    1. ~IF[ %候補 は `id$a 属性 %A を有する ] ⇒ %~tuple群 に次の~entryを追加する ⇒ ( %A の値, %候補, `id^i, ε )
    2. ~IF[ %候補 は `name$a 属性 %A を有する ] ⇒ %~tuple群 に次の~entryを追加する ⇒ ( %A の値, %候補, `name^i, ε )
    ◎ For each listed element candidate whose form owner is the form element, with the exception of any input elements whose type attribute is in the Image Button state: • If candidate has an id attribute, add an entry to sourced names with that id attribute's value as the string, candidate as the element, and id as the source. • If candidate has a name attribute, add an entry to sourced names with that name attribute's value as the string, candidate as the element, and name as the source. ◎ For each img element candidate whose form owner is the form element: • If candidate has an id attribute, add an entry to sourced names with that id attribute's value as the string, candidate as the element, and id as the source. • If candidate has a name attribute, add an entry to sourced names with that name attribute's value as the string, candidate as the element, and name as the source.
  4. %~map ~LET %F の`過去~名~map$ ◎ ↓
  5. %~map を成す ~EACH( %過去~entry ) に対し ⇒ %~tuple群 に次に与える~entryを追加する ⇒ ( %過去~entry の名前, %過去~entry の要素, `過去^i, [ %過去~entry が %~map 内に居続けた時間 ] ) ◎ For each entry past entry in the past names map add an entry to sourced names with the past entry's name as the string, past entry's element as the element, past as the source, and the length of time past entry has been in the past names map as the age.
  6. %~tuple群 を成す~entryたちを 次に従って~sortする:

    1. ~entryの要素の`~tree順序$で~sortする
    2. 要素が同じ~entryたちは、 ~sourceが[ `id^i, `name^i, `過去^i ]の順になるように~sortする
    3. 要素が同じ, かつ[ ~source ~EQ `過去^i ]を満たす~entryどうしは、 齢が最長なものが先に来るように~sortする
    ◎ Sort sourced names by tree order of the element entry of each tuple, sorting entries with the same element by putting entries whose source is id first, then entries whose source is name, and finally entries whose source is past, and sorting entries with the same element and source by their age, oldest first.
  7. %名前~list ~LET 空~list ◎ ↓
  8. %~tuple群 を成す ~EACH( %~entry ) に対し

    1. %名前 ~LET %~entry の名前
    2. ~IF[ %名前 ~NEQ 空~文字列 ]~AND[ %名前 ~NIN %名前~list ] ⇒ %名前~list に %名前 を付加する
    ◎ Remove any entries in sourced names that have the empty string as their name. ◎ Remove any entries in sourced names that have the same name as an earlier entry in the map.
  9. ~RET %名前~list ◎ Return the list of names from sourced names, maintaining their relative order.

`form$e 要素 %F 上で`有名~propの値を決定する$ときは、 所与の ( 【 %F が`~supportする~prop名$】 %名前 ) に対し,次を走らすモノトスル: ◎ To determine the value of a named property name for a form element, the user agent must run the following steps:

  1. %O ~LET %F に結付けられた`~live$な `RadioNodeList$I ~obj — それは、 所与の時点で[[ 次の手続きが返す要素たち ]が成す,`~tree順序$による~list ]を表現するものとして定義される:

    1. %候補~群 ~LET ~AND↓ を満たす要素たちが成す集合

      • %F に`所有され$ている
      • `~listされる$要素である
      • [ `id$a 属性を有していて,その値 ~EQ %名前 ]~OR[ `name$a 属性を有していて,その値 ~EQ %名前 ]
      • [ `input$e 要素でない ]~OR[ `input$e 要素であって,その `type$a 属性の状態 ~NEQ `Image$st ]
    2. ~IF[ %候補~群 は空でない ] ⇒ ~RET %候補~群
    3. ~RET ~AND↓ を満たす要素たちが成す集合:

      • %F に`所有され$ている
      • `img$e 要素である
      • [ `id$a 属性を有していて,その値 ~EQ %名前 ]~OR[ `~nameI$a 属性を有していて,その値 ~EQ %名前 ]
    ◎ Let candidates be a live RadioNodeList object containing all the listed elements, whose form owner is the form element, that have either an id attribute or a name attribute equal to name, with the exception of input elements whose type attribute is in the Image Button state, in tree order. ◎ If candidates is empty, let candidates be a live RadioNodeList object containing all the img elements, whose form owner is the form element, that have either an id attribute or a name attribute equal to name, in tree order.
  2. %過去~entry ~LET [ %F の`過去~名~map$内に %名前 をある要素に対応付ける~entryが在るならば それ / 無いならば ε ] ◎ ↓
  3. %O が表現する要素の個数に応じて: ◎ ↓

    • 0 個:

      1. ~Assert: %過去~entry ~NEQ ε
      2. ~RET %過去~entry の要素
      ◎ If candidates is empty, name is the name of one of the entries in the form element's past names map: return the object associated with name in that map.
    • 複数~個 ⇒ ~RET %O ◎ If candidates contains more than one node, return candidates.
    • 1 個:

      1. %要素 ~LET %O が表現する唯一の要素
      2. ~IF[ %過去~entry ~NEQ ε ] ⇒ %過去~entry の要素 ~SET %要素
      3. ~ELSE ⇒ %F の`過去~名~map$に[ %名前 を %要素 に対応付ける~entry ]を追加する
      4. ~RET %要素
      ◎ Otherwise, candidates contains exactly one node. Add a mapping from name to the node in candidates in the form element's past names map, replacing the previous entry with the same name, if any. ◎ Return the node in candidates.

`form$e 要素の`過去~名~map$ %~map を成すどの %~entry に対しても ⇒ %~entry の要素の`~form所有者$が変化したときは、 %~map から %~entry を除去するモノトスル。 ◎ If an element listed in a form element's past names map changes form owner, then its entries must be removed from that map.


``submit()@m ~method手続きは ⇒ `~formを提出する$( コレ, `submit() ~method^i【!#submit-subbmitted-from-method】 ) ◎ The submit() method steps are to submit this from this, with submitted from submit() method set to true.

``requestSubmit(submitter)@m ~method手続きは: ◎ The requestSubmit(submitter) method, when invoked, must run the following steps:

  1. ~IF[ %submitter ~NEQ ~NULL ]: ◎ If submitter is not null, then:

    1. ~IF[ %submitter は`提出-~button$でない ] ⇒ ~THROW `TypeError$E ◎ If submitter is not a submit button, then throw a TypeError.
    2. ~IF[ %submitter の`~form所有者$ ~NEQ コレ ] ⇒ ~THROW `NotFoundError$E ◎ If submitter's form owner is not this form element, then throw a "NotFoundError" DOMException.
  2. ~ELSE ⇒ %submitter ~SET コレ ◎ Otherwise, set submitter to this form element.
  3. `~formを提出する$( コレ, %submitter ) ◎ Submit this form element, from submitter.

``reset()@m ~method手続きは: ◎ The reset() method, when invoked, must run the following steps:

  1. ~IF[ コレ の`再設定~lockか$ ~EQ ~T ] ⇒ ~RET ◎ If the form element is marked as locked for reset, then return.
  2. コレの `再設定~lockか@ ~SET ~T ◎ Mark the form element as locked for reset.
  3. `~formを再設定する$( コレ ) ◎ Reset the form element.
  4. コレの`再設定~lockか$ ~SET ~F ◎ Unmark the form element as locked for reset.
``checkValidity()@m ~method手続きは ⇒ ~RET ~IS[ 次の結果 ~EQ `肯定的^i ] ⇒ `拘束を静的に検証する$( コレ ) ◎ If the checkValidity() method is invoked, the user agent must statically validate the constraints of the form element, and return true if the constraint validation return a positive result, and false if it returned a negative result.
``reportValidity()@m ~method手続きは ⇒ ~RET ~IS[ 次の結果 ~EQ `肯定的^i ] ⇒ `拘束を対話的に検証する$( コレ ) ◎ If the reportValidity() method is invoked, the user agent must interactively validate the constraints of the form element, and return true if the constraint validation return a positive result, and false if it returned a negative result.

例 — 2 つの探索~formがある: ◎ This example shows two search forms:

`form-1^xCode

4.10.4. ``label^e 要素

`分類$
`~flow内容$ /`句ng内容$ / `対話的~内容$ / `可触~内容$ ◎ Flow content. ◎ Phrasing content. ◎ Interactive content. ◎ Palpable content.
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`句ng内容$ — ただし,子孫に次に挙げるものは無いとする ⇒# この要素の`~label先~control$以外の`~label可能$な要素/ `label$e 要素 ◎ Phrasing content, but with no descendant labelable elements unless it is the element's labeled control, and no descendant label elements.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
``for$a — この~labelを~form~controlに結付ける。 ◎ for — Associate the label with form control
`~accessibilityの考慮点$
`label$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLLabelElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  readonly attribute `HTMLFormElement$I? ``form$m;
  [`CEReactions$] attribute DOMString ``htmlFor$m;
  readonly attribute `HTMLElement$I? ``control$m;
};

`label$e 要素は、 ~UI内の~captionを`表現-$する。 この~captionには、 次のいずれかにより,[ 当の要素の`~label先~control$と呼ばれる,特定の~form~control ]を結付けれる:

  • ``for@a 属性を利用して,当の~controlを指す — この属性に指定する値は、 `label$e 要素と同じ`~tree$内にある`~label可能$な要素の`~ID$でなければナラナイ。
  • 要素の内側に当の~controlを置く
◎ The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself.

`label$e 要素の `~label先~control@ は、 次の手続きの結果として定義される:

  1. %S ~LET [ 要素は ``for$a 属性 %A を有するならば 要素と同じ`~tree$内の要素のうち,[ `~ID$ ~EQ %A の値 ]を満たすものたちが成す集合 / ~ELSE_ 要素の子孫~要素たちが成す集合 ]
  2. %S ~SET %S 内の`~label可能$な要素たちが成す集合
  3. ~IF[ %S は空である ] ⇒ ~RET ε (~~存在しない)
  4. ~RET %S 内の要素のうち,`~tree順序$で最初のもの
◎ Except where otherwise specified by the following rules, a label element has no labeled control. ◎ The for attribute may be specified to indicate a form control with which the caption is to be associated. If the attribute is specified, the attribute's value must be the ID of a labelable element in the same tree as the label element. If the attribute is specified and there is an element in the tree whose ID is equal to the value of the for attribute, and the first such element in tree order is a labelable element, then that element is the label element's labeled control. ◎ If the for attribute is not specified, but the label element has a labelable element descendant, then the first such descendant in tree order is the label element's labeled control.

`label$e 要素の正確な[ 既定の呈示, 既定の挙動 ] — 特に,その`作動化の挙動$ — は、 当の~platformに~label用の挙動があるならば,それに合致するベキである。 `label$e 要素の`作動化の挙動$は、[ その子孫である`対話的~内容$ %C, および %C の子孫 ]を~targetにする~eventに対しては,何もしないモノトスル。 ◎ The label element's exact default presentation and behavior, in particular what its activation behavior might be, if anything, should match the platform's label behavior. The activation behavior of a label element for events targeted at interactive content descendants of a label element, and any descendants of those interactive content descendants, must be to do nothing.

注記: `~formに所有され得る~custom要素$は,`~label可能$な要素なので、 ~UAにとっては,[ `label$e 要素の`作動化の挙動$が`~label先~control$に影響iする所 ]では[ 組込みの要素, ~custom要素 ]どちらも影響iされることになる。 ◎ Form-associated custom elements are labelable elements, so for user agents where the label element's activation behavior impacts the labeled control, both built-in and custom elements will be impacted.

例えば,[ ~labelを~clickすると ~form~controlが作動化されるような~platform ]上の~UAは、[ 次の~code片にて `label$e が~clickされた ]ときも — 利用者が要素を誘発したかのように — `input$e 要素に向けて`~click~eventを発火-$できる: ◎ For example, on platforms where clicking a label activates the form control, clicking the label in the following snippet could trigger the user agent to fire a click event at the input element, as if the element itself had been triggered by the user:

`label-1^xCode

同様に `my-checkbox^e は,`~formに所有され得る~custom要素$として宣言されたと見做すなら (`この例@~HEcustom#custom-elements-face-example$の様に)、 次の~codeは: ◎ Similarly, assuming my-checkbox was declared as a form-associated custom element (like in this example), then the code

`label-2^xCode

`my-checkbox^e 要素に向けて`~click~eventを発火-$するのと同じ挙動になる。 ◎ would have the same behavior, firing a click event at the my-checkbox element.

両~事例とも,他の~platformにおける挙動は、 当の~controlを~focusするだけか,何もしないであろう。 ◎ On other platforms, the behavior in both cases might be just to focus the control, or to do nothing.

次の例に 3 個の~form~controlを示す。 それぞれは~labelを伴い、 うち 2 個には,利用者が倣うべき形式を示す短い~textも含められている。 ◎ The following example shows three form controls each with a label, two of which have small text showing the right format for users to use.

`label-3^xCode
%label.``control$m
この要素の`~label先~control$を返す。 ◎ Returns the form control that is associated with this element.
%label.``form$m
この要素の`~label先~control$が[ 在るならば その `~form所有者$ / 無いならば ~NULL ]を返す。 ◎ Returns the form owner of the form control that is associated with this element. ◎ Returns null if there isn't one.

``htmlFor@m ~IDL属性は、 ``for$a 内容~属性を`反映する$モノトスル。 ◎ The htmlFor IDL attribute must reflect the for content attribute.

``control@m 取得子~手続きは ⇒ ~RET [ コレの`~label先~control$ ~NEQ ε ならば それ / ~ELSE_ ~NULL ] ◎ The control IDL attribute must return the label element's labeled control, if any, or null if there isn't one.

``form@m 取得子~手続きは: ◎ The form IDL attribute must run the following steps:

  1. %~control ~LET コレの`~label先~control$ ◎ ↓
  2. ~IF[ %~control ~EQ ε ] ⇒ ~RET ~NULL ◎ If the label element has no labeled control, then return null.
  3. ~IF[ %~control は`~formに所有され得る要素$でない ] ⇒ ~RET ~NULL ◎ If the label element's labeled control is not a form-associated element, then return null.
  4. ~RET %~control の`~form所有者$ (これも ~NULL になり得る) ◎ Return the label element's labeled control's form owner (which can still be null).

注記: `label$e 要素の ``form$m ~IDL属性は、[ `~listされる$`~formに所有され得る要素$ ]の `form$m ~IDL属性とは異なる。【!*原文リンク誤:form$a】 また、 `label$e 要素には `form$a 内容~属性は適用されない。 ◎ The form IDL attribute on the label element is different from the form IDL attribute on listed form-associated elements, and the label element does not have a form content attribute.


%control.`labels$m
この~form~controlを`~label先~control$にしている `label$e 要素すべてからなる `NodeList$I を返す。 ◎ Returns a NodeList of all the label elements that the form control is associated with.

各[ `~label可能$な要素 / `input$e 要素 ]には、 `NodeList$I ~objが結付けられる — それは、[ 当の要素を`~label先~control$とする `label$e 要素たち ]からなる,`~tree順序$による~listを表現し,次のいずれかの~IDL属性に公開される: ◎ Labelable elements and all input elements have a live NodeList object associated with them that represents the list of label elements, in tree order, whose labeled control is the element in question.\

次の(適合していない)な例に、 `input$e 要素の `type$a 属性が変更されたとき, `NodeList$I に何が起こるか, および `labels$m は何を返すかを示す: ◎ This (non-conforming) example shows what happens to the NodeList and what labels returns when an input element has its type attribute changed.

<!doctype html>
<p><label><input></label></p>
<script>
 const %input = document.querySelector('input');
 const %labels = %input.labels;
 console.assert(%labels.length === 1);

 %input.type = 'hidden';
 console.assert(%labels.length === 0); /* 
%input はもはや %label の`~label先~control$でない
◎
the input is no longer the label's labeled control
 */
 console.assert(%input.%labels === null);

 %input.type = 'checkbox';
 console.assert(%labels.length === 1); /* 
%input は再び %label の`~label先~control$になる
◎
the input is once again the label's labeled control
 */
 console.assert(%input.labels === %labels); /* 
元と同じ値が返される
◎
same value as returned originally
 */
</script>

4.10.5. ``input^e 要素

【 この節の内容は、 `別~page@HTML-input-ja.html$にて。 】

4.10.6. ``button^e 要素

`分類$
`~flow内容$ /`句ng内容$ / `対話的~内容$ / `可触~内容$ / ◎ Flow content. ◎ Phrasing content. ◎ Interactive content. ◎ Listed, labelable, submittable, and autocapitalize-inheriting form-associated element. ◎ Palpable content.
`~formに所有され得る要素$のうち[ `~listされる$ / `~label可能$な / `提出-可能$な / `自動頭字化-を継承-$する ]もの。 ◎ ↑
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`句ng内容$ — ただし、 子孫に[ `対話的~内容$ / `tabindex$a 属性が指定された要素 ]があってはならない。 ◎ Phrasing content, but there must be no interactive content descendant and no descendant with the tabindex attribute specified.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`disabled$a — この~form~controlは不能化されるかどうか。 ◎ disabled — Whether the form control is disabled
`form$a — この要素の所有者にする `form$e 要素を与える。 ◎ form — Associates the element with a form element
`formaction$a — `~form提出$用に利用する`~URL$ ◎ formaction — URL to use for form submission
`formenctype$a — `~form提出$用に利用する`~entry~list$用の符号化法の種別。 ◎ formenctype — Entry list encoding type to use for form submission
`formmethod$a — `~form提出$用に利用する~method(等) ◎ formmethod — Variant to use for form submission
`formnovalidate$a — `~form提出$に際し,~form~control検証を迂回する。 ◎ formnovalidate — Bypass form control validation for form submission
`formtarget$a — `~form提出$用の 【それにより~navigateされる】 `~navigable$。 ◎ formtarget — Navigable for form submission
`name$a — [ `~form提出$用に / `form.elements$m ~APIにおいて ]利用する,この要素の名前。 ◎ name — Name of the element to use for form submission and in the form.elements API
`popovertarget$a — [ ~toggleする/示す/隠す ]~targetになる`~popover要素$を指示する。 ◎ popovertarget — Targets a popover element to toggle, show, or hide
`popovertargetaction$a — ~targetにされた`~popover要素$に対し[ ~toggleする/示す/隠す ]のうちどれを行うかを指示する。 ◎ popovertargetaction — Indicates whether a targeted popover element is to be toggled, shown, or hidden
``type$a — ~buttonの型 ◎ type — Type of button
``value$a — `~form提出$用に利用される値。 ◎ value — Value to be used for form submission
`~accessibilityの考慮点$
`button$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLButtonElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute boolean `disabled$m;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute USVString `formAction$m;
  [`CEReactions$] attribute DOMString `formEnctype$m;
  [`CEReactions$] attribute DOMString `formMethod$m;
  [`CEReactions$] attribute boolean `formNoValidate$m;
  [`CEReactions$] attribute DOMString `formTarget$m;
  [`CEReactions$] attribute DOMString `name$m;
  [`CEReactions$] attribute DOMString ``type$m;
  [`CEReactions$] attribute DOMString ``value$m;

  readonly attribute boolean `willValidate$m;
  readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);

  readonly attribute `NodeList$I `labels$m;
};

`HTMLButtonElement$I includes `PopoverInvokerElement$I;

`button$e 要素は、 その内容で~labelされた~buttonを`表現-$する。 ◎ The button element represents a button labeled by its contents.

要素は`~button$になる。 ◎ The element is a button.

``type@a 属性は、 ~buttonが作動化されたときの挙動を制御する。 この属性は,`列挙d属性$であり、 次に挙げる~keyword, とり得る状態, それらの対応付けが定義される: ◎ The type attribute controls the behavior of the button when it is activated. It is an enumerated attribute with the following keywords and states:

~keyword 状態 概略的な記述
`submit@v `Submit$st ~formを提出する
`reset@v `Reset$st ~formを再設定する
`button@v `Button$st 何もしない
◎ Keyword|State|Brief description submit|Submit Button|Submits the form. reset|Reset Button|Resets the form. button|Button|Does nothing.

この属性の[ `欠落~値~用の既定の状態$/`妥当でない値~用の既定の状態$ ]は、 `Submit$st とする。 ◎ The attribute's missing value default and invalid value default are both the Submit Button state.

要素は、 その ``type$a 属性が `Submit$st 状態にあるときは,特定的に`提出-~button$になる。 ◎ If the type attribute is in the Submit Button state, the element is specifically a submit button.

拘束~検証 ⇒ 要素が次を満たしている間は、 `拘束~検証の対象外$になる ⇒ ``type$a 属性の状態 ~IN { `Reset$st, `Button$st } ◎ Constraint validation: If the type attribute is in the Reset Button state or the Button state, the element is barred from constraint validation.

`button$e 要素 %要素 の`作動化の挙動$は、 所与の ( %~event ) に対し: ◎ A button element element's activation behavior given event is:

  1. ~IF[ %要素 は`不能化されて$feいる ] ⇒ ~RET ◎ If element is disabled, then return.
  2. ~IF[ %要素 の`~node文書$は`全部的に作動中$でない ] ⇒ ~RET ◎ If element's node document is not fully active, then return.
  3. %所有者 ~LET %要素 の`~form所有者$ ◎ ↓
  4. ~IF[ %所有者 ~NEQ ~NULL ]: ◎ If element has a form owner then\

    1. %要素 の ``type$a 属性の状態に応じて: ◎ switch on element's type attribute's state, then:

      • `Submit@st :

        1. %利用者-関与i ~LET `~event用の~naviに対する利用者-関与i$( %~event )
        2. `~formを提出する$( %所有者, %要素, %利用者-関与i )
        ◎ Submit Button • Submit element's form owner from element with userInvolvement set to event's user navigation involvement.
      • `Reset@st ⇒ `~formを再設定する$( %所有者 ) ◎ Reset Button • Reset element's form owner.
      • `Button@st ⇒ 何もしない ◎ Button • Do nothing.
  5. `~popover~target属性~作動化の挙動$( %要素 ) ◎ Run the popover target attribute activation behavior given element.

`button$e 要素の: ◎ ↓

注記: `formnovalidate$a 属性は、 提出-~buttonが拘束~検証を誘発しないようにするために利用できる。 ◎ The formnovalidate attribute can be used to make submit buttons that do not trigger the constraint validation.

上に挙げた`~form提出用の属性$は、 要素の ``type$a 属性が `Submit$st 状態にある場合を除いて,指定されてはナラナイ。 ◎ The formaction, formenctype, formmethod, formnovalidate, and formtarget must not be specified if the element's type attribute is not in the Submit Button state.

``value@a 属性は、 ~form提出の目的における要素の値を与える。 要素の`値$feは[ 要素が ``value$a 属性を有するならば その値 / ~ELSE_ 空~文字列 ]になる。 ◎ The value attribute gives the element's value for the purposes of form submission. The element's value is the value of the element's value attribute, if there is one, or the empty string otherwise.

注記: ~button(および その値)は、 ~form提出を起動するために利用されたときに限り,~form提出に含まれる。 ◎ A button (and its value) is only included in the form submission if the button itself was used to initiate the form submission.


``value@m ~IDL属性は、 ``value$a 内容~属性を`反映する$モノトスル。 ◎ The value IDL attribute must reflect the content attribute of the same name.

``type@m ~IDL属性は、 `既知な値のみに制限され$る下で, ``type$a 内容~属性を`反映する$モノトスル。 ◎ The type IDL attribute must reflect the content attribute of the same name, limited to only known values.

`button$e 要素には、 次に挙げる~IDL~memberもある: ◎ ↓

"~~ヒントを~~示す" と~labelされた次の~buttonは、 作動化-時には~dialog~boxを~pop-upする: ◎ The following button is labeled "Show hint" and pops up a dialog box when activated:

`button-1^xCode

4.10.7. ``select^e 要素

`分類$
`~flow内容$ /`句ng内容$ / `対話的~内容$ / `可触~内容$ / ◎ Flow content. ◎ Phrasing content. ◎ Interactive content. ◎ Listed, labelable, submittable, resettable, and autocapitalize-inheriting form-associated element. ◎ Palpable content.
`~formに所有され得る要素$のうち[ `~listされる$ / `提出-可能$な / `再設定-可能$な / `自動頭字化-を継承-$する ]もの。 ◎ ↑
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
0 個~以上の[ 次のいずれかに該当する要素 ] ⇒# `option$e / `optgroup$e / `hr$e / `~scriptを~supportする要素$ ◎ Zero or more option, optgroup, hr, and script-supporting elements. Zero or more option, optgroup, and script-supporting elements.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`autocomplete$a — ~formの~autofill特能~用の~hint。 ◎ autocomplete — Hint for form autofill feature
`disabled$a — この~form~controlは不能化されるかどうか。 ◎ disabled — Whether the form control is disabled
`form$a — この要素の所有者にする `form$e 要素を与える。 ◎ form — Associates the element with a form element
``multiple$a — 複数個の値を許容するかどうか。 ◎ multiple — Whether to allow multiple values
`name$a — [ `~form提出$用に / `form.elements$m ~APIにおいて ]利用する,この要素の名前。 ◎ name — Name of the element to use for form submission and in the form.elements API
``required$a — この~controlは`~form提出$用に必須とされるかどうか。 ◎ required — Whether the control is required for form submission
``size$a — ~controlの~size。 ◎ size — Size of the control
`~accessibilityの考慮点$
[ 要素は ``multiple$a 属性を有する ]~OR[ 要素は ``size$a 属性を有していて,その値 ~GT 1 ]ならば ⇒ `作者~向け@~HTMLARIA#el-select-multiple-or-size-greater-1$/ `実装者~向け@~HTMLAAM#el-select-listbox$ ◎ If the element has a multiple attribute or a size attribute with a value > 1: for authors; for implementers.
他の場合 ⇒ `作者~向け@~HTMLARIA#el-select$/ `実装者~向け@~HTMLAAM#el-select-combobox$ ◎ Otherwise: for authors; for implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLSelectElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute DOMString `autocomplete$m;
  [`CEReactions$] attribute boolean `disabled$m;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute boolean ``multiple$m;
  [`CEReactions$] attribute DOMString `name$m;
  [`CEReactions$] attribute boolean ``required$m;
  [`CEReactions$] attribute unsigned long ``size$m;

  readonly attribute DOMString ``type$m;

  [SameObject] readonly attribute `HTMLOptionsCollection$I ``options$m;
  [`CEReactions$] attribute unsigned long ``length$m;
  getter `HTMLOptionElement$I? ``item$m(unsigned long %index);
  `HTMLOptionElement$I? ``namedItem$m(DOMString %name);
  [`CEReactions$] undefined ``add$m((`HTMLOptionElement$I or `HTMLOptGroupElement$I) %element, optional (`HTMLElement$I or long)? %before = null);
  [`CEReactions$] undefined ``remove$m(); // ChildNode overload
  [`CEReactions$] undefined ``remove$m(long %index);
  [`CEReactions$] ``setter$m undefined (unsigned long %index, `HTMLOptionElement$I? %option);

  [SameObject] readonly attribute `HTMLCollection$I ``selectedOptions$m;
  attribute long ``selectedIndex$m;
  attribute DOMString ``value$m;

  readonly attribute boolean `willValidate$m;
  readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);

  undefined ``showPicker$m();

  readonly attribute `NodeList$I `labels$m;
};

`select$e 要素は、 選択肢( option )の集合から いくつかを選択するための~controlを表現する。 ◎ The select element represents a control for selecting amongst a set of options.

``multiple@a 属性は、 `真偽-属性$である。 `select$e 要素は、 この属性を[ 有する / 有さない ]ならば,要素の``選択肢~list$から[ 0 個~以上の選択肢 / 単独の選択肢 ]を選択するための~controlを`表現-$する。 ◎ The multiple attribute is a boolean attribute. If the attribute is present, then the select element represents a control for selecting zero or more options from the list of options. If the attribute is absent, then the select element represents a control for selecting a single option from the list of options.

``size@a 属性は、 利用者に示す選択肢の個数を与える。 この属性に指定する値は、 1 以上の`妥当な負でない整数$でなければナラナイ。 ◎ The size attribute gives the number of options to show to the user. The size attribute, if specified, must have a value that is a valid non-negative integer greater than zero.

`select$e 要素 %select の ``表示~size@ は:

  1. %属性~値 ~LET %select は ``size$a 属性を[ 有するならば その値/ 有さないならば ε ]
  2. ~IF[ %属性~値 ~NEQ ε ]:

    1. %結果 ~LET `負でない整数として構文解析する$( %属性~値 )
    2. ~IF[ %結果 ~NIN { `失敗^i, 0† } ] ⇒ ~RET %結果

      【† 原文は %結果 が(不適合な値) 0 になる場合に,そのまま %結果 を返しているが、 `失敗^i と等価に扱われるべきであろう。 】

  3. ~IF[ %select は ``multiple$a 属性を有する ] ⇒ ~RET 4
  4. ~RET 1
◎ The display size of a select element is the result of applying the rules for parsing non-negative integers to the value of element's size attribute, if it has one and parsing it is successful. If applying those rules to the attribute's value is not successful, or if the size attribute is absent, then the element's display size is 4 if the element's multiple content attribute is present, and 1 otherwise.

`select$e 要素 %select の ``選択肢~list@ は、 次を満たす `option$e 要素~すべてからなり, 常に`~tree順序$で~sortするとする ⇒ [ %select の子である ]~OR[ %select の子である `optgroup$e 要素の子である ] ◎ The list of options for a select element consists of all the option element children of the select element, and all the option element children of all the optgroup element children of the select element, in tree order.

``required@a 属性は、 `真偽-属性$である。 指定されたときは、 利用者には,~formを提出する前に値を選択することが 要求されることになる。 ◎ The required attribute is a boolean attribute. When specified, the user will be required to select a value before submitting the form.

`select$e 要素 %select の `仮入力~label選択肢@ は、 次に従って決定される[ `option$e 要素または ε ]である:

  1. ~IF[ %select は次の `条件 (A)^i を満たさない ] ⇒ ~RET ε

    `条件 (A)^i ⇒ [ ``required$a 属性を有する ]~AND[ ``multiple$a 属性は有さない ]~AND[ ``表示~size$ ~EQ 1 ]

  2. ~IF[ %select の``選択肢~list$は空である ] ⇒ ~RET ε
  3. %option ~LET %select の``選択肢~list$を成す最初の要素
  4. ~IF[ %option の`値$opt ~NEQ 空~文字列 ] ⇒ ~RET ε
  5. ~IF[ %option の親~node ~NEQ %select (親~nodeは `optgroup$e 要素である) ] ⇒ ~RET ε
  6. ~RET %option
◎ If a select element has a required attribute specified, does not have a multiple attribute specified, and has a display size of 1; and if the value of the first option element in the select element's list of options (if any) is the empty string, and that option element's parent node is the select element (and not an optgroup element), then that option is the select element's placeholder label option.

`select$e 要素は、 上の手続きの `条件 (A)^i を満たすならば,その`仮入力~label選択肢$ ~EQ ε になってはナラナイ。 【これは、作者~向け要件。】 ◎ If a select element has a required attribute specified, does not have a multiple attribute specified, and has a display size of 1, then the select element must have a placeholder label option.

注記: 実施においては、 上の段落に言明した要件が適用され得るのは,当の `select$e 要素が[ 値 ~GT 1 にされた ``size$a 属性 ]を有さないときに限られている。 ◎ In practice, the requirement stated in the paragraph above can only apply when a select element does not have a size attribute with a value greater than 1.

拘束~検証 ⇒ `select$e 要素 %select は、 次を満たしている間は,`欠落である難あり$になる ⇒ [ %select は ``required$a 属性を有する ]~AND[ %select の``選択肢~list$内に次を満たす `option$e 要素 %option は無い ] ⇒ [ %option の`選択状態$opt ~EQ ~T ]~AND[ %option ~NEQ %select の`仮入力~label選択肢$ ] ◎ Constraint validation: If the element has its required attribute specified, and either none of the option elements in the select element's list of options have their selectedness set to true, or the only option element in the select element's list of options with its selectedness set to true is the placeholder label option, then the element is suffering from being missing.

`select$e 要素 %select が ``multiple$a 属性を有さない下では — 以下、 %L は %select の``選択肢~list$を表すとする — ~UAは: ◎ ↓

`選択状態を設定する~algo@ は、 所与の ( `select$e 要素 %select ) に対し, 次の手続きを走らす:

  1. ~IF[ %select は ``multiple$a 属性を有する ] ⇒ ~RET
  2. %L ~LET %要素 の``選択肢~list$
  3. %~list ~LET %L を成す要素のうち[ `選択状態$opt ~EQ ~T ]を満たすものからなる同順の~list
  4. ~IF[ %~list は空である ]:

    1. ~IF[ %select の``表示~size$ ~NEQ 1 ] ⇒ ~RET
    2. %L を成す ~EACH( %option ) に対し ⇒ ~IF[ %option は`不能化されて$optいない ] ⇒# %option の`選択状態$opt ~SET ~T; ~RET
  5. ~ELSE ⇒ %~list を成す最後の要素~以外の ~EACH( %要素 ) に対し ⇒ %要素 の`選択状態$opt ~SET ~F
◎ The selectedness setting algorithm, given a select element element, is to run the following steps: • If element's multiple attribute is absent, and element's display size is 1, and no option elements in the element's list of options have their selectedness set to true, then set the selectedness of the first option element in the list of options in tree order that is not disabled, if any, to true, and return. • If element's multiple attribute is absent, and two or more option elements in element's list of options have their selectedness set to true, then set the selectedness of all but the last option element with its selectedness set to true in the list of options in tree order to false.

`option$e 用の`~HTML要素~挿入-時の手続き$は、 所与の ( %挿入される~node ) に対し:

  1. %親 ~LET %挿入される~node の親
  2. ~IF[ %親 は `optgroup$e 要素である ] ⇒ %親 ~SET %親 の親
  3. ~IF[ %親 は `select$e 要素である ] ⇒ `選択状態を設定する~algo$( %親 )
◎ The option HTML element insertion steps, given insertedNode, are: • If insertedNode's parent is a select element, or insertedNode's parent is an optgroup element whose parent is a select element, then run that select element's selectedness setting algorithm.

`option$e 用の`~HTML要素~除去-時の手続き$は、 所与の ( %除去される~node, %旧-親 ) に対し:

  1. ~IF[ %旧-親 は `optgroup$e 要素である ] ⇒ %旧-親 ~SET %旧-親 の親
  2. ~IF[ %旧-親 は `select$e 要素である ] ⇒ `選択状態を設定する~algo$( %旧-親 )
◎ The option HTML element removing steps, given removedNode and oldParent, are: • If oldParent is a select element, or oldParent is an optgroup element whose parent is a select element, then run that select element's selectedness setting algorithm.

`optgroup$e 用の`~HTML要素~除去-時の手続き$は、 所与の ( %除去される~node, %旧-親 ) に対し: ◎ The optgroup HTML element removing steps, given removedNode and oldParent, are:

  1. ~IF[ %旧-親 は `select$e 要素である ]~AND[ %除去される~node の子として `option$e 要素【!%option】が在る ] ⇒ `選択状態を設定する~algo$( %旧-親 ) ◎ If oldParent is a select element and removedNode has an option child, then run oldParent's selectedness setting algorithm.

`選択肢~list$を成す ある `option$e 要素 %要素 を `設定し直すよう依頼-@ されたときは、 次を走らす

  1. %親 ~LET %要素 の親
  2. ~IF[ %親 は `optgroup$e 要素である ] ⇒ %親 ~SET %親 の親
  3. `選択状態を設定する~algo$( %親 )
◎ If an option element in the list of options asks for a reset, then run that select element's selectedness setting algorithm.

`select$e 要素 %select が[ `不能化されて$feいない ]~AND[ ``multiple$a 属性を有する ]ならば、 ~UAは, %select の``選択肢~list$を成す各[ `不能化されて$optいない `option$e 要素 ] %option に対し: ◎ If the multiple attribute is present, and the element is not disabled, then the user agent\

`選択-更新の通知を送信する@ ときは、 所与の ( `select$e 要素 %select ) に対し ⇒ `要素~taskを~queueする$( `利用者~対話~task~source$, %select, 次の手続き ) ◎ When the user agent is to send select update notifications,\ queue an element task on the user interaction task source given the select element to\

手続きは: ◎ run these steps:

  1. %select の`利用者~妥当性$ ~SET ~T ◎ Set the select element's user validity to true.
  2. `入力~eventを発火する$( %select, `input$et ) ◎ Fire an event named input at the select element, with the bubbles and composed attributes initialized to true.
  3. `入力~eventを発火する$( %select, `change$et ) ◎ Fire an event named change at the select element, with the bubbles attribute initialized to true.

`select$e 要素 %select 用の`再設定~algo$は: ◎ The reset algorithm for a select element selectElement is:

  1. %select の`利用者~妥当性$ ~SET ~F ◎ Set selectElement's user validity to false.
  2. %select の``選択肢~list$を成す ~EACH( %option ) に対し: ◎ For each optionElement of selectElement's list of options:

    1. %option の`選択状態$opt ~SET ~IS[ %option は `selected@#attr-option-selected$a 属性を有する ] ◎ If optionElement has a selected attribute, then set optionElement's selectedness to true; otherwise set it to false.
    2. %option の`~dirtyか$opt ~SET ~F ◎ Set optionElement's dirtiness to false.
  3. `選択状態を設定する~algo$( %select ) ◎ Run the selectedness setting algorithm given selectElement.

`select$e 要素の: ◎ ↓

`不能化されて$feいない `select$e 要素は、 `変異-可能$feとする。 ◎ A select element that is not disabled is mutable.

%select.``type$m
要素が ``multiple$a 属性を[ 有するならば `select-multiple^l / 有さないならば `select-one^l ]を返す。 ◎ Returns "select-multiple" if the element has a multiple attribute, and "select-one" otherwise.
%select.``options$m
``選択肢~list$ を表現する `HTMLOptionsCollection$I を返す。 ◎ Returns an HTMLOptionsCollection of the list of options.
%select.``length$m [ = %value ]
``選択肢~list$を成す要素の個数を返す。 ◎ Returns the number of elements in the list of options.
より少ない数に設定された場合、 `select$e 内の `option$e 要素たちを,その個数になるよう切落す。 ◎ When set to a smaller number, truncates the number of option elements in the select.
より多い数に設定された場合、 新たな空欄の `option$e 要素を `select$e に追加する。 ◎ When set to a greater number, adds new blank option elements to the select.
%element = %select.``item$m(%index)
%select[%index]
``選択肢~list$内の %~index 番の~itemを返す。 ◎ Returns the item with index index from the list of options. The items are sorted in tree order.
%element = %select.``namedItem$m(%name)
``選択肢~list$内に次を満たす~itemが[ 在るならば それらのうち最初のもの / 無いならば ~NULL ]返す ⇒ [ %name ~EQ `~ID$ ]~OR[ %name ~EQ `name@#attr-option-name$a ] ◎ Returns the first item with ID or name name from the list of options. ◎ Returns null if no element with that ID could be found.
%select.``add$m(%element [, %before ])
%before にて与えられた~nodeの前に, %element を挿入する。 ◎ Inserts element before the node given by before.
%before 引数は、 ``選択肢~list$を成す要素の他に,数もとり得る。 数の場合、 %before は``選択肢~list$内の %before 番の~itemとして解釈される。 ◎ The before argument can be a number, in which case element is inserted before the item with that number, or an element from the list of options, in which case element is inserted before that element.
%before が[ 省略されている / ~NULL / 範囲外の数 ]の場合、 %element は ~listの末尾に追加されることになる。 ◎ If before is omitted, null, or a number out of range, then element will be added at the end of the list.
%element が %select の先祖である場合、 `HierarchyRequestError$E 例外が投出される。 ◎ This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted.
%select.``selectedOptions$m
``選択肢~list$内の選択されているものからなる `HTMLCollection$I を返す。 ◎ Returns an HTMLCollection of the list of options that are selected.
%select.``selectedIndex$m [ = %value ]
選択されている~itemが[ 在るならば それらのうち最初のものの~index / 無いならば −1 ]を返す。 ◎ Returns the index of the first selected item, if any, or −1 if there is no selected item.
設定して,選択を変更できる。 ◎ Can be set, to change the selection.
%select.``value$m [ = %value ]
選択されている~itemが[ 在るならば それらのうち最初のものの`値$opt / 無いならば 空~文字列 ]を返す。 ◎ Returns the value of the first selected item, if any, or the empty string if there is no selected item.
設定して,選択を変更できる。 ◎ Can be set, to change the selection.
%select.``showPicker()$m
%select 用に適用-可能な~pickerがあれば、 利用者が値を選択できるよう,それを示す。 ◎ Shows any applicable picker UI for select, so that the user can select a value.
%select が`変異-可能$feでない場合、 `InvalidStateError$E 例外が投出される。 ◎ Throws an "InvalidStateError" DOMException if select is not mutable.
`一過な作動化を有して$いない間に~callされた場合、 `NotAllowedError$E 例外が投出される。 ◎ Throws a "NotAllowedError" DOMException if called without transient user activation.
%select が非同一-生成元 `iframe$e の内側にある場合、 `SecurityError$E 例外が投出される。 ◎ Throws a "SecurityError" DOMException if select is inside a cross-origin iframe.
%select が`具現化されて$いない場合、 `NotSupportedError$E 例外が投出される。 ◎ Throws a "NotSupportedError" DOMException if select is not being rendered.
``type@m 取得子~手続きは ⇒ ~RET コレは ``multiple$a 属性を[ 有するならば `select-multiple^l / 有さないならば `select-one^l ] ◎ The type IDL attribute, on getting, must return the string "select-one" if the multiple attribute is absent, and the string "select-multiple" if the multiple attribute is present.
``options@m 取得子~手続きは ⇒ ~RET 次のようにされた `HTMLOptionsCollection$I ~obj ⇒# 根 ~SET コレ, ~filterは コレの``選択肢~list$を成す各~要素に合致する ◎ The options IDL attribute must return an HTMLOptionsCollection rooted at the select node, whose filter matches the elements in the list of options.

`HTMLSelectElement$I ~objは、 その ``options$m 取得子~手続きが返す~obj — 以下では、 ~objの `~option群@ と称される — を そのまま映し出す。 それが`~supportする~prop~index$は、 常に,`~option群$のそれと同じとする。 ◎ The options collection is also mirrored on the HTMLSelectElement object. The supported property indices at any instant are the indices supported by the object returned by the options attribute at that instant.

``length@m 取得子~手続きは ⇒ ~RET コレの`~option群$が成す`~collectionにより表現され$る~nodeの個数 ◎ The length IDL attribute must return the number of nodes represented by the options collection.\
``length$m 設定子~手続きは ⇒ コレの`~option群$の `length$m 設定子~手続き( 所与の値 ) ◎ On setting, it must act like the attribute of the same name on the options collection.
``item(index)@m ~method手続きは ⇒ ~RET コレの`~option群$の `item$m ~method手続き( %index ) ◎ The item(index) method must return the value returned by the method of the same name on the options collection, when invoked with the same argument.
``namedItem(name)@m ~method手続きは ⇒ ~RET コレの`~option群$の `namedItem$m ~method手続き( %name ) ◎ The namedItem(name) method must return the value returned by the method of the same name on the options collection, when invoked with the same argument.

``setter@m において[ `新たな有index~propの値を設定する$ / `既存の有index~propの値を設定する$ ]ときは、 代わりに,コレの`~option群$の`対応する~algo@~HTMLcdom#dom-htmloptionscollection-setter$を走らすモノトスル。 ◎ When the user agent is to set the value of a new indexed property or set the value of an existing indexed property for a select element, it must instead run the corresponding algorithm on the select element's options collection.

``add(element, before)@m ~method手続きは ⇒ コレの`~option群$の `add$m ~method手続き( %element, %before ) ◎ Similarly, the add(element, before) method must act like its namesake method on that same options collection.

``remove(index)@m ~method手続きは: ◎ The remove() method must\

  1. ~IF[ %index ~NEQ ε ] ⇒ コレの`~option群$の `remove$m ~method手続き( %index ) ◎ act like its namesake method on that same options collection when it has arguments,\
  2. ~ELSE ⇒ [ コレが実装する `ChildNode$I ~interface( `HTMLSelectElement$I ~interfaceが継承する `Element$I ~interfaceが実装する それ) ]の `remove@~DOM4#dom-childnode-remove$m ~method手続き() ◎ and like its namesake method on the ChildNode interface implemented by the HTMLSelectElement ancestor interface Element when it has no arguments.
``selectedOptions@m 取得子~手続きは ⇒ ~RET 次のようにされた `HTMLCollection$I ~obj ⇒# 根 ~SET コレ, ~filterは コレの``選択肢~list$を成す要素のうち[ `選択状態$opt ~EQ ~T ]を満たすものに合致する ◎ The selectedOptions IDL attribute must return an HTMLCollection rooted at the select node, whose filter matches the elements in the list of options that have their selectedness set to true.

``selectedIndex@m 取得子~手続きは: ◎ The selectedIndex IDL attribute, on getting, must\

  1. コレの``選択肢~list$を成す ~EACH( %option ) に対し ⇒ ~IF[ %option の`選択状態$opt ~EQ ~T ] ⇒ ~RET %option の`~index$opt ◎ return the index of the first option element in the list of options in tree order that has its selectedness set to true, if any.\
  2. ~RET −1 ◎ If there isn't one, then it must return −1.

``selectedIndex$m 設定子~手続きは: ◎ On setting, the selectedIndex attribute must\

  1. コレの``選択肢~list$を成す ~EACH( %option ) に対し:

    1. %option の`選択状態$opt ~SET ~F
    2. ~IF[ %option の`~index$opt ~NEQ 所与の値 ] ⇒ ~CONTINUE
    3. %option の`選択状態$opt ~SET ~T
    4. %option の`~dirtyか$opt ~SET ~T
    ◎ set the selectedness of all the option elements in the list of options to false, and then the option element in the list of options whose index is the given new value, if any, must have its selectedness set to true and its dirtiness set to true.

注記: これは、 `select$e 要素~内の どの要素も[ `選択状態$opt ~NEQ ~T ]にさせ得る — 要素が[ ``multiple$a 属性を有さない ]~AND[ ``表示~size$ ~EQ 1 ]の場合でも。 ◎ This can result in no element having a selectedness set to true even in the case of the select element having no multiple attribute and a display size of 1.

``value@m 取得子~手続きは: ◎ The value IDL attribute, on getting, must\

  1. コレの``選択肢~list$を成す ~EACH( %option ) に対し ⇒ ~IF[ %option の`選択状態$opt ~EQ ~T ] ⇒ ~RET %option の`値$opt ◎ return the value of the first option element in the list of options in tree order that has its selectedness set to true, if any.\
  2. ~RET 空~文字列 ◎ If there isn't one, then it must return the empty string.

``value$m 設定子~手続きは: ◎ On setting, the value attribute must\

  1. コレの``選択肢~list$を成す ~EACH( %option ) に対し ⇒ %option の`選択状態$opt ~SET ~F ◎ set the selectedness of all the option elements in the list of options to false,\
  2. コレの``選択肢~list$を成す ~EACH( %option ) に対し ⇒ ~IF[ %option の`値$opt ~EQ 所与の値 ] ⇒# %option の`選択状態$opt ~SET ~T; %option の`~dirtyか$opt ~SET ~T; ~BREAK ◎ and then the first option element in the list of options, in tree order, whose value is equal to the given new value, if any, must have its selectedness set to true and its dirtiness set to true.

注記: これは、 `select$e 要素~内の どの要素も[ `選択状態$opt ~NEQ ~T ]にさせ得る — 要素が[ ``multiple$a 属性を有さない ]~AND[ ``表示~size$ ~EQ 1 ]の場合でも。 ◎ This can result in no element having a selectedness set to true even in the case of the select element having no multiple attribute and a display size of 1.

``multiple@m ~IDL属性は、 ``multiple$a 内容~属性を`反映する$モノトスル。

``required@m ~IDL属性は、 ``required$a 内容~属性を`反映する$モノトスル。

``size@m ~IDL属性は、 `既定の値$feは 0 とする下で, ``size$a 内容~属性を`反映する$モノトスル。

◎ The multiple, required, and size IDL attributes must reflect the respective content attributes of the same name.\ The size IDL attribute has a default value of 0.

注記: 歴史的な理由から、 ``size$m ~IDL属性の値の既定の値は,利用されている実際の~sizeを返さない。 ``size$a 内容~属性が無い場合、 それは, ``multiple$a 属性が[ 在るならば 4 / 無いならば 1 ]になる。 ◎ For historical reasons, the default value of the size IDL attribute does not return the actual size used, which, in the absence of the size content attribute, is either 1 or 4 depending on the presence of the multiple attribute.

`select$e 要素には、 次に挙げる~IDL~memberもある: ◎ ↓

`select$e 要素を利用して,利用者が単独の選択肢を選択できるような選択肢の集合を利用者に提供する例 — 予め,既定の選択肢が選択されている: ◎ The following example shows how a select element can be used to offer the user with a set of options from which the user can select a single option. The default option is preselected.

`select-1^xCode

既定の選択肢が無い場合、 代わりに`仮入力~label選択肢$を利用できる: ◎ When there is no default option, a placeholder can be used instead:

`select-2^xCode

利用者が、 提供された選択肢の集合から いくつでも選択できるようにする例 — すべての選択肢が,既定で選択されている: ◎ Here, the user is offered a set of options from which they can select any number. By default, all five options are selected.

`select-3^xCode

利用者が 1 個~以上の~itemを選択する必要がある~UI例: ◎ Sometimes, a user has to select one or more items. This example shows such an interface.

`select-4^xCode

ときには、 分離子があると有用になる: ◎ Occasionally it can be useful to have a separator:

`select-5^xCode

4.10.8. ``datalist^e 要素

`分類$
`~flow内容$ / `句ng内容$ ◎ Flow content. ◎ Phrasing content.
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$

次のいずれか一方:

  • `句ng内容$
  • 0 個~以上の[ 次のいずれかに該当する要素 ] ⇒# `option$e, `~scriptを~supportする要素$
◎ Either: phrasing content. ◎ Or: Zero or more option and script-supporting elements.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~accessibilityの考慮点$
`datalist$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLDataListElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [SameObject] readonly attribute `HTMLCollection$I ``options$m;
};

`datalist$e 要素は、[[ 他の~control用の定義済み選択肢 ]を表現する[ `option$e 要素の集合 ]]を表現する。 描画においては、 `datalist$e 要素は,何も`表現-$しない — それらの子も含め,隠されるベキである。 ◎ The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden.

`datalist$e 要素は、 2 つの仕方で利用できる: ◎ ↓

`datalist$e 要素は、 `input$e 要素に,その `list$a 属性を通して結び付けられる。 ◎ The datalist element is hooked up to an input element using the list attribute on the input element.

`datalist$e 要素の子孫である `option$e 要素のうち,次を満たすものは、 示唆を表現し,[ `値$opt, `~label$opt ]を有する ⇒ [ `不能化されて$optいない ]~AND[ `値$optは空でない文字列である ] ◎ Each option element that is a descendant of the datalist element, that is not disabled, and whose value is a string that isn't the empty string, represents a suggestion. Each suggestion has a value and a label.

%datalist.``options$m
`datalist$e 要素の `option$e 要素からなる `HTMLCollection$I を返す。 ◎ Returns an HTMLCollection of the option elements of the datalist element.
``options@m 取得子~手続きは ⇒ ~RET 次のようにされた `HTMLCollection$I ⇒# 根 ~SET コレ, ~filterは `option$e 要素に合致する ◎ The options IDL attribute must return an HTMLCollection rooted at the datalist node, whose filter matches option elements.

拘束~検証 ⇒ 要素が次を満たしている間は、 `拘束~検証の対象外$になる ⇒ 要素の先祖に `datalist$e 要素がある ◎ Constraint validation: If an element has a datalist element ancestor, it is barred from constraint validation.

4.10.9. ``optgroup^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
`select$e 要素の子として。 ◎ As a child of a select element.
`内容~model$
0 個~以上の[ 次のいずれかに該当する要素 ] ⇒# `option$e, `~scriptを~supportする要素$ ◎ Zero or more option and script-supporting elements.
`text/html における~tag省略$
`optgroup$e 要素の`終了~tag$は、 次が満たされるならば,省略できる ⇒ [ 直後に[ 別の `optgroup$e / `hr$e ]要素が来る ]~OR[ 親~要素~内に後続する内容は無い ] ◎ An optgroup element's end tag can be omitted if the optgroup element is immediately followed by another optgroup element, if it is immediately followed by an hr element, or if there is no more content in the parent element.
`内容~属性$
`大域~属性$ ◎ Global attributes
``disabled$a — この~form~controlは不能化されるかどうか。 ◎ disabled — Whether the form control is disabled
``label$a — 利用者から可視な~label。 ◎ label — User-visible label
`~accessibilityの考慮点$
`optgroup$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLOptGroupElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute boolean ``disabled$m;
  [`CEReactions$] attribute DOMString ``label$m;
};

`optgroup$e 要素は、 共通な~labelを伴う `option$e 要素たちが成す~groupを`表現-$する。 ◎ The optgroup element represents a group of option elements with a common label.

この~groupは、 `optgroup$e 要素の子である `option$e 要素たちからなる。 ◎ The element's group of option elements consists of the option elements that are children of the optgroup element.

~UAは、 そのような~groupを `select$e 要素~内に示すときは, ~groupを成す `option$e 要素たちを — それらが互いに関係しているように — 他の `option$e 要素から分離して示すベキである。 ◎ When showing option elements in select elements, user agents should show the option elements of such groups as being related to each other and separate from other option elements.

``disabled@a 属性は、 `真偽-属性$である — それは、 ~groupを成す `option$e 要素たちを まとめて`不能化する@#concept-option-disabled$ことに利用できる。 ◎ The disabled attribute is a boolean attribute and can be used to disable a group of option elements together.

``label@a 属性は、 指定されなければナラナイ。 その値は、 ~groupの名前を与える。 ~UIの目的においては、 ~UAは,この属性の値を利用して `select$e 要素~内の `option$e 要素~groupに~labelを与えるベキである。 ◎ The label attribute must be specified. Its value gives the name of the group, for the purposes of the user interface. User agents should use this attribute's value when labeling the group of option elements in a select element.

``disabled@m ~IDL属性は、 ``disabled$a 内容~属性を`反映する$モノトスル。

``label@m ~IDL属性は、 ``label$a 内容~属性を`反映する$モノトスル。

◎ The disabled and label attributes must reflect the respective content attributes of the same name.

注記: `optgroup$e 要素を選択する仕方は無い。 選択できるのは `option$e 要素に限られる。 `optgroup$e 要素は、 単に`option$e 要素~groupに~labelを供するに過ぎない。 ◎ There is no way to select an optgroup element. Only option elements can be selected. An optgroup element merely provides a label for a group of option elements.

`select$e ~drop-down ~widget内に 3 種の課程からなる講義を提供する例: ◎ The following snippet shows how a set of lessons from three courses could be offered in a select drop-down widget:

`optgroup-1^xCode

4.10.10. ``option^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
`select$e 要素の子として。 ◎ As a child of a select element.
`datalist$e 要素の子として。 ◎ As a child of a datalist element.
`optgroup$e 要素の子として。 ◎ As a child of an optgroup element.
`内容~model$
要素は[ ``label$a 属性を有する ]~AND[ ``value$a 属性を有する ]場合に限り ⇒ `なし$。 ◎ If the element has a label attribute and a value attribute: Nothing.
要素は[ ``label$a 属性を有する ]~AND[ ``value$a 属性を有さない ]場合に限り ⇒ `~text$。 ◎ If the element has a label attribute but no value attribute: Text.
要素は[ ``label$a 属性を有さない ]~AND[ `datalist$e 要素の子でない ]場合に限り ⇒ `要素間~空白$でない`~text$。 ◎ If the element has no label attribute and is not a child of a datalist element: Text that is not inter-element whitespace.
要素は[ ``label$a 属性を有する ]~AND[ `datalist$e 要素の子である ]場合に限り ⇒ `~text$。 ◎ If the element has no label attribute and is a child of a datalist element: Text.
`text/html における~tag省略$
`option$e 要素の`終了~tag$は、 次が満たされるならば,省略できる ⇒ [ 直後に[ 別の `option$e / `optgroup$e / `hr$e ]要素が来る ]~OR[ 親~要素~内に後続する内容は無い ] ◎ An option element's end tag can be omitted if the option element is immediately followed by another option element, if it is immediately followed by an optgroup element, if it is immediately followed by an hr element, or if there is no more content in the parent element.
`内容~属性$
`大域~属性$ ◎ Global attributes
``disabled$a — この~form~controlは不能化されるかどうか。 ◎ disabled — Whether the form control is disabled
``label$a — 利用者から可視な~label。 ◎ label — User-visible label
``selected$a — この選択肢が既定ので選択されるかどうか。 ◎ selected — Whether the option is selected by default
``value$a — `~form提出$用に利用される値。 ◎ value — Value to be used for form submission
`~accessibilityの考慮点$
`option$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window,
 `LegacyFactoryFunction$=``Option$m(optional DOMString %text = "", optional DOMString %value, optional boolean %defaultSelected = false, optional boolean %selected = false)]
interface `HTMLOptionElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute boolean ``disabled$m;
  readonly attribute `HTMLFormElement$I? ``form$m;
  [`CEReactions$] attribute DOMString ``label$m;
  [`CEReactions$] attribute boolean ``defaultSelected$m;
  attribute boolean ``selected$m;
  [`CEReactions$] attribute DOMString ``value$m;

  [`CEReactions$] attribute DOMString ``text$m;
  readonly attribute long ``index$m;
};

`option$e 要素は、[ `select$e 要素~内の選択肢 ], または[ `datalist$e 要素~内の示唆~listの一部 ]を`表現-$する。 ◎ The option element represents an option in a select element or as part of a list of suggestions in a datalist element.

`select$e 要素の定義にて述べた一定の状況下では、 `option$e 要素は `select$e 要素の`仮入力~label選択肢$になり得る。 `仮入力~label選択肢$は、 実際の選択肢を表現しない代わりに `select$e ~controlの~labelを表現する。 ◎ In certain circumstances described in the definition of the select element, an option element can be a select element's placeholder label option. A placeholder label option does not represent an actual option, but instead represents a label for the select control.

``disabled@a 属性は、 `真偽-属性$である。 `option$e 要素は、 ~OR↓ を満たすとき, `不能化されて@opt いるとされる:

  • ``disabled$a 属性を有する
  • `disabled@#attr-optgroup-disabled$a 属性を有する `optgroup$e 要素の子である
◎ The disabled attribute is a boolean attribute. An option element is disabled if its disabled attribute is present or if it is a child of an optgroup element whose disabled attribute is present.

【!*?#attr-option-disabled】 `option$e 要素が`不能化されて$optいる間は、 `利用者~対話~task~source$から`~queueされ@~WAPI#queue-a-task$る どの `click$et ~eventも,要素に配送しないモノトスル。 ◎ An option element that is disabled must prevent any click events that are queued on the user interaction task source from being dispatched on the element.

``label@a 属性は、 要素の~labelを供する。 `option$e 要素の `~label@opt は、[[ 要素は ``label$a 内容~属性を有していて,その値 ~NEQ 空~文字列 ]ならば その値 / ~ELSE_ 要素の``text$m ~IDL属性の値 ]になる。 ◎ The label attribute provides a label for element. The label of an option element is the value of the label content attribute, if there is one and its value is not the empty string, or, otherwise, the value of the element's text IDL attribute.

``label$a 内容~属性に指定する値は、 空であってはナラナイ。 ◎ The label content attribute, if specified, must not be empty.

``value@a 属性は、 要素の値を供する。 `option$e 要素の `値@opt は、[ 要素は ``value$a 内容~属性を有するならば その値 / ~ELSE_ 要素の ``text$m ~IDL属性の値 ]になる。 ◎ The value attribute provides a value for element. The value of an option element is the value of the value content attribute, if there is one, or, if there is not, the value of the element's text IDL attribute.

``selected@a 属性は、 `真偽-属性$である。 それは、 要素の既定の`選択状態$optを表現する。 ◎ The selected attribute is a boolean attribute. It represents the default selectedness of the element.

`option$e 要素の `~dirtyか@opt は、 真偽-状態であり,初期~時には ~F とする。 それは ``selected$a 内容~属性を[ 追加する/除去する ]ことが効果を及ぼすかどうかを制御する。 ◎ The dirtiness of an option element is a boolean state, initially false. It controls whether adding or removing the selected content attribute has any effect.

`option$e 要素の `選択状態@opt は、 真偽-状態であり,初期~時には ~F とする。 他が指定されない限り,要素の作成-時には、 要素の`選択状態$optは,[ 要素が ``selected$a 属性を有する ]ならば ~T に設定されるモノトスル。 [ `~dirtyか$opt ~EQ ~F ]の下では、 ``selected$a 属性が `option$e 要素[ に追加される / から`除去される^em ]度に、 その`選択状態$optは,[ ~T / ~F ]に設定されるモノトスル。 ◎ The selectedness of an option element is a boolean state, initially false. Except where otherwise specified, when the element is created, its selectedness must be set to true if the element has a selected attribute. Whenever an option element's selected attribute is added, if its dirtiness is false, its selectedness must be set to true. Whenever an option element's selected attribute is removed, if its dirtiness is false, its selectedness must be set to false.

注記: ``Option()$m 構築子は、 3 個~以下の引数で~callされたときは、 `選択状態$optの初期~状態を上書きして — [ 3 個目の引数 ~EQ ~T ]の場合( ``selected$a 属性は設定されることを含意する)であっても — 状態は 常に ~F になるようにする。 4 個目の引数を利用すれば、 初期の`選択状態$opt状態を明示的に設定できる。 ◎ The Option() constructor, when called with three or fewer arguments, overrides the initial state of the selectedness state to always be false even if the third argument is true (implying that a selected attribute is to be set). The fourth argument can be used to explicitly set the initial selectedness state when using the constructor.

`select$e 要素が `multiple@#attr-select-multiple$a 属性を有さない場合、 その子孫に[ ``selected$a 属性を有する ]ような `option$e 要素が複数~在ってはナラナイ。 ◎ A select element whose multiple attribute is not specified must not have more than one descendant option element with its selected attribute set.

`option$e 要素 %option の `~index@opt は、[ %option が ある`選択肢~list$内に含まれるならば その~list内で %option より前に来る `option$e 要素の個数 / ~ELSE_ 0 † ]とする。 【† ~listの先頭にあるときと区別がつかないことになる。】 ◎ An option element's index is the number of option elements that are in the same list of options but that come before it in tree order. If the option element is not in a list of options, then the option element's index is zero.

%option.``selected$m
要素が選択されているならば ~T を返す。 他の場合は ~F を返す。 ◎ Returns true if the element is selected, and false otherwise.
設定して,この要素の現在の状態を上書きできる。 ◎ Can be set, to override the current state of the element.
%option.``index$m
`select$e 要素の`~option群$における要素の~indexを返す。 【!`options@#dom-select-options$m ~list】 ◎ Returns the index of the element in its select element's options list.
%option.``form$m
要素が属する `form$e 要素が[ 在るならば それ / 無いならば ~NULL ]を返す。 ◎ Returns the element's form element, if any, or null otherwise.
%option.``text$m
~ASCII空白は縮約され, `script$e 要素は飛ばされることを除いて、 `textContent$m と同じ。 ◎ Same as textContent, except that spaces are collapsed and script elements are skipped.
%option = new ``Option( [ text [, value [, defaultSelected [, selected ] ] ] ] )$m
新たな `option$e 要素を返す。 ◎ Returns a new option element.
%text 引数は、 要素の内容を設定する。 ◎ The text argument sets the contents of the element.
%value 引数は ``value$a 属性を設定する。 ◎ The value argument sets the value attribute.
%defaultSelected 引数は ``selected$a 属性を設定する。 ◎ The defaultSelected argument sets the selected attribute.
%selected 引数は、 要素が選択されるかどうかを設定する。 省略された場合、[ %defaultSelected 引数 ~EQ ~T ]であっても,要素は選択されない。 ◎ The selected argument sets whether or not the element is selected. If it is omitted, even if the defaultSelected argument is true, the element is not selected.

``disabled@m ~IDL属性は、 ``disabled$a 内容~属性を`反映する$モノトスル。 ◎ The disabled IDL attribute must reflect the content attribute of the same name.\

``defaultSelected@m ~IDL属性は、 ``selected$a 内容~属性を`反映する$モノトスル。 ◎ The defaultSelected IDL attribute must reflect the selected content attribute.

``label@m 取得子~手続きは ⇒ ~RET [ コレは ``label$a 内容~属性を有するならば その値 / ~ELSE_ コレの`~label$opt ] ◎ The label IDL attribute, on getting, if there is a label content attribute, must return that attribute's value; otherwise, it must return the element's label.\
``label$m 設定子~手続きは ⇒ コレの ``label$a 内容~属性を所与の値に設定する ◎ On setting, the element's label content attribute must be set to the new value.
``value@m 取得子~手続きは ⇒ ~RET コレの`値$opt ◎ The value IDL attribute, on getting, must return the element's value.\
``value$m 設定子~手続きは ⇒ コレの ``value$a 内容~属性を所与の値に設定する ◎ On setting, the element's value content attribute must be set to the new value.
``selected@m 取得子~手続きは ⇒ ~RET コレの`選択状態$opt ◎ The selected IDL attribute, on getting, must return true if the element's selectedness is true, and false otherwise.\

``selected$m 設定子~手続きは:

  1. コレの`選択状態$opt ~SET 所与の値
  2. コレの`~dirtyか$opt ~SET ~T
  3. コレを`設定し直すよう依頼-$する
◎ On setting, it must set the element's selectedness to the new value, set its dirtiness to true, and then cause the element to ask for a reset.
``index@m 取得子~手続きは ⇒ ~RET コレの`~index$opt ◎ The index IDL attribute must return the element's index.

``text@m 取得子~手続きは:

  1. %結果 ~LET 次に該当する `Text$I ~node【の~data】すべてを`~tree順序$で連結した結果 ⇒ コレの子孫であって,コレの子孫である[ `script$e / ~SVG `script@~SVGinteract#elementdef-script$e ]要素の子孫ではない
  2. ~RET `~ASCII空白を剥いで縮約する$( %結果 )
◎ The text IDL attribute, on getting, must return the result of stripping and collapsing ASCII whitespace from the concatenation of data of all the Text node descendants of the option element, in tree order, excluding any that are descendants of descendants of the option element that are themselves script or SVG script elements.
``text$m 設定子~手続きは ⇒ コレの`全~内容を文字列に置換する$( 所与の値 ) ◎ The text attribute's setter must string replace all with the given value within this element.

``form@m 取得子~手続きは:

  1. %select ~LET コレの親
  2. ~IF[ %select は `optgroup$e 要素である ] ⇒ %select ~SET %select の親
  3. ~IF[ %select は `select$e 要素である ] ⇒ ~RET %select の `form$m 取得子~手続き()
  4. ~RET ~NULL
◎ The form IDL attribute's behavior depends on whether the option element is in a select element or not. If the option has a select element as its parent, or has an optgroup element as its parent and that optgroup element has a select element as its parent, then the form IDL attribute must return the same value as the form IDL attribute on that select element. Otherwise, it must return null.

``Option(text, value, defaultSelected, selected)@m は、 `HTMLOptionElement$I ~objを作成する旧来の~factory関数である( `createElement()$m などの~DOMによる~factory~methodに加えて供されている)。 その~method手続きは: ◎ A legacy factory function is provided for creating HTMLOptionElement objects (in addition to the factory methods from DOM such as createElement()): Option(text, value, defaultSelected, selected).\ ◎ When invoked, the legacy factory function must perform the following steps:

  1. %文書 ~LET `現在の大域~obj$に`結付けられた文書$ ◎ Let document be the current global object's associated Document.
  2. %option ~LET `要素を作成する$( %文書, `option^l, `~HTML名前空間$ ) ◎ Let option be the result of creating an element given document, option, and the HTML namespace.
  3. ~IF[ %text ~NEQ 空~文字列 ] ⇒ %option に次のようにされた新たな `Text$I ~nodeを付加する ⇒ ~data ~SET %text ◎ If text is not the empty string, then append to option a new Text node whose data is text.
  4. ~IF[ %value ~NEQ ε ] ⇒ %option の`属性~値を設定する$( "``value$a", %value ) ◎ If value is given, then set an attribute value for option using "value" and value.
  5. ~IF[ %defaultSelected ~EQ ~T ] ⇒ %option の`属性~値を設定する$( "``selected$a", 空~文字列 ) ◎ If defaultSelected is true, then set an attribute value for option using "selected" and the empty string.
  6. %option の`選択状態$opt ~SET %selected ( %defaultSelected を問わず) ◎ If selected is true, then set option's selectedness to true; otherwise set its selectedness to false (even if defaultSelected is true).
  7. ~RET %option ◎ Return option.

4.10.11. ``textarea^e 要素

`分類$
`~flow内容$ /`句ng内容$ / `対話的~内容$ / `可触~内容$ / ◎ Flow content. ◎ Phrasing content. ◎ Interactive content. ◎ Listed, labelable, submittable, resettable, and autocapitalize-inheriting form-associated element. ◎ Palpable content.
`~formに所有され得る要素$のうち[ `~listされる$ / `提出-可能$な / `再設定-可能$な / `自動頭字化-を継承-$する ]もの。 ◎ ↑
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`~text$。 ◎ Text.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`autocomplete$a — ~formの~autofill特能~用の~hint。 ◎ autocomplete — Hint for form autofill feature
``cols$a — 行あたりの最大~文字~数 ◎ cols — Maximum number of characters per line
`dirname$a — `~form提出$時に要素の`方向性$を送信するために利用される,~form~controlの名前。 ◎ dirname — Name of form control to use for sending the element's directionality in form submission
`disabled$a — この~form~controlは不能化されるかどうか。 ◎ disabled — Whether the form control is disabled
`form$a — この要素の所有者にする `form$e 要素を与える。 ◎ form — Associates the element with a form element
``maxlength$a — 値の最大`長さ$。 ◎ maxlength — Maximum length of value
``minlength$a — 値の最小`長さ$。 ◎ minlength — Minimum length of value
`name$a — [ `~form提出$用に / `form.elements$m ~APIにおいて ]利用する,この要素の名前。 ◎ name — Name of the element to use for form submission and in the form.elements API
``placeholder$a — この~form~controlに配置され,利用者から可視になる~label。 ◎ placeholder — User-visible label to be placed within the form control
``readonly$a — 利用者が値を編集できなくするかどうか ◎ readonly — Whether to allow the value to be edited by the user
``required$a — この~controlは`~form提出$用に必須とされるかどうか。 ◎ required — Whether the control is required for form submission
``rows$a — 示す行l数 ◎ rows — Number of lines to show
``wrap$a — `~form提出$時に,~form~controlの値はどう折返されるか ◎ wrap — How the value of the form control is to be wrapped for form submission
`~accessibilityの考慮点$
`textarea$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLTextAreaElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute DOMString `autocomplete$m;
  [`CEReactions$] attribute unsigned long ``cols$m;
  [`CEReactions$] attribute DOMString ``dirName$m;
  [`CEReactions$] attribute boolean `disabled$m;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute long ``maxLength$m;
  [`CEReactions$] attribute long ``minLength$m;
  [`CEReactions$] attribute DOMString `name$m;
  [`CEReactions$] attribute DOMString ``placeholder$m;
  [`CEReactions$] attribute boolean ``readOnly$m;
  [`CEReactions$] attribute boolean ``required$m;
  [`CEReactions$] attribute unsigned long ``rows$m;
  [`CEReactions$] attribute DOMString ``wrap$m;

  readonly attribute DOMString ``type$m;
  [`CEReactions$] attribute DOMString ``defaultValue$m;
  attribute [`LegacyNullToEmptyString$] DOMString ``value$m;
  readonly attribute unsigned long ``textLength$m;

  readonly attribute boolean `willValidate$m;
  readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);

  readonly attribute `NodeList$I `labels$m;

  undefined `select$m();
  attribute unsigned long `selectionStart$m;
  attribute unsigned long `selectionEnd$m;
  attribute DOMString `selectionDirection$m;
  undefined `setRangeText$m(DOMString %replacement);
  undefined `setRangeText$m(DOMString %replacement, unsigned long %start, unsigned long %end, optional `SelectionMode$I %selectionMode = "preserve");
  undefined `setSelectionRange$m(unsigned long %start, unsigned long %end, optional DOMString %direction);
};

この節においては ⇒# `LF^i は 文字 `000A^U `LINE FEED^cn / `CR^i は 文字 `000D^U `CARRIAGE RETURN^cn ◎終 を表すとする。

`textarea$e 要素は、[ 要素の ``生の値@ を与える,複数行からなる素な~text ]用の編集~controlを`表現-$する。 この~controlの内容は、 ~controlの既定の値を表現する。 ◎ The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value.

`textarea$e ~controlの``生の値$は、 初期~時には空~文字列になるモノトスル。 ◎ The raw value of a textarea control must be initially the empty string.

注記: この要素には、 `双方向-~algoを孕む描画~要件がある@~HTMLdom#bidireq$。 ◎ This element has rendering requirements involving the bidirectional algorithm.

``readonly@a 属性は、 `真偽-属性$であり,利用者が~textを編集できなくするかどうかを制御するために利用される。 ◎ The readonly attribute is a boolean attribute used to control whether the text can be edited by the user or not.

この例では、 ~text~controlは読専~fileの中身を表現するので `readonly^a が付与されている: ◎ In this example, a text control is marked read-only because it represents a read-only file:

`textarea-1^xCode

拘束~検証 ⇒ 要素が次を満たしている間は、 `拘束~検証の対象外$になる ⇒ `textarea$e 要素は ``readonly$a 属性を有する ◎ Constraint validation: If the readonly attribute is specified on a textarea element, the element is barred from constraint validation.

`textarea$e 要素は、[ `不能化されて$feいない ]~AND[ ``readonly$a 属性を有さない ]ならば,`変異-可能$feとする。 ◎ A textarea element is mutable if it is neither disabled nor has a readonly attribute specified.

`textarea$e 要素 %要素 が`変異-可能$feである下では、 ~UAは: ◎ When a textarea is mutable,\

`textarea$e 要素の`値は~dirtyか$feは、[ 利用者が~controlとヤリトリして その``生の値$を変更する ]度に, ~T に設定されるモノトスル。 ◎ A textarea element's dirty value flag must be set to true whenever the user interacts with the control in a way that changes the raw value.

`textarea$e 要素~用の`~clone時の手続き$は、 要素の[ ``生の値$, `値は~dirtyか$fe ]も~clone先の~nodeに複製するモノトスル。 ◎ The cloning steps for textarea elements must propagate the raw value and dirty value flag from the node being cloned to the copy.

`textarea$e 要素~用の`子~群~変更-時の手続き$は、 次を走らすモノトスル ⇒ ~IF[ 要素の`値は~dirtyか$fe ~EQ ~F ] ⇒ 要素の``生の値$ ~SET 要素の`子~text内容$ ◎ The children changed steps for textarea elements must, if the element's dirty value flag is false, set the element's raw value to its child text content.

`textarea$e 要素~用の`再設定~algo$は ⇒ 要素の ⇒# `利用者~妥当性$ ~SET ~T, `値は~dirtyか$fe ~SET ~F, ``生の値$ ~SET 要素の`子~text内容$

◎ The reset algorithm for textarea elements is to\ set the user validity to false,\ dirty value flag back to false,\ and set the raw value of element to its child text content.

`textarea$e 要素が[ `~HTML構文解析器$ / `~XML構文解析器$ ]の`~open要素~stack$から~popされたときは、 ~UAは,次を呼出すモノトスル ⇒ 要素~用の`再設定~algo$ ◎ When a textarea element is popped off the stack of open elements of an HTML parser or XML parser, then the user agent must invoke the element's reset algorithm.

`textarea$e 要素 %要素 が`変異-可能$feである下では、 ~UAは,利用者が %要素 の書字~方向を[ 左横書き/右横書き ]に変更できるようにするベキである。 利用者がそうしたときは、 ~UAは,次の手続きを走らすモノトスル: ◎ If the element is mutable, the user agent should allow the user to change the writing direction of the element, setting it either to a left-to-right writing direction or a right-to-left writing direction. If the user does so, the user agent must then run the following steps:

  1. %要素 の`dir$a 属性 ~SET 利用者が選択した書字~方向に応じて[ 左横書きならば `ltr$v / 右横書き ならば `rtl$v ] ◎ Set the element's dir attribute to "ltr" if the user selected a left-to-right writing direction, and "rtl" if the user selected a right-to-left writing direction.
  2. `要素~taskを~queueする$( `利用者~対話~task~source$, %要素, 次の手続き ) ◎ Queue an element task on the user interaction task source given the textarea element to\

    手続きは ⇒ `入力~eventを発火する$( %要素, `input$et ) ◎ fire an event named input at the textarea element, with the bubbles and composed attributes initialized to true.

``cols@a 属性は、 `一行分の字数$ — 期待される,行あたりの最大~文字~数 — を指定する。 この属性に指定する値は、 1 以上の`妥当な負でない整数$でなければナラナイ。 ◎ The cols attribute specifies the expected maximum number of characters per line. If the cols attribute is specified, its value must be a valid non-negative integer greater than zero.\

`textarea$e 要素の `一行分の字数@ は:

  1. %属性~値 ~LET 要素は ``cols$a 属性を[ 有するならば その値/ 有さないならば ε ]
  2. ~IF[ %属性~値 ~NEQ ε ]:

    1. %結果 ~LET `負でない整数として構文解析する$( %属性~値 )
    2. ~IF[ %結果 ~NIN { `失敗^i, 0 } ] ⇒ ~RET %結果
  3. ~RET 20
◎ If applying the rules for parsing non-negative integers to the attribute's value results in a number greater than zero, then the element's character width is that value; otherwise, it is 20.

~UAは、 `一行分の字数$を[ ~serverが選好する 各~行lごとの文字~数を表す,利用者への~hint ]として利用してヨイ(例: 視覚的な~UAにおいては、 ~controlの横幅を その文字~数にするなど)。 視覚的な描画においては、 ~UAは,描画~時に 各~行lが この文字~数を超えないように 利用者の入力を折返すベキである。 ◎ The user agent may use the textarea element's character width as a hint to the user as to how many characters the server prefers per line (e.g. for visual user agents by making the width of the control be that many characters). In visual renderings, the user agent should wrap the user's input in the rendering so that each line is no wider than this number of characters.

【 `一行分の字数$は、 原文では “`character width^en” と称されている (そのまま訳すと “文字横幅” になり,紛らわしい)。 下の “`行数$( `character height^en )” も同様。 】【 各~文字の~~字幅の違い(全角と半角など)を どう取扱うかについては、 この仕様には述べられていない。 】

``rows@a 属性は、 `行数$ — 利用者に示す行l数 — を指定する。 この属性に指定する値は、 1 以上の`妥当な負でない整数$でなければナラナイ。 ◎ The rows attribute specifies the number of lines to show. If the rows attribute is specified, its value must be a valid non-negative integer greater than zero.\

`textarea$e 要素の `行数@ は:

  1. %属性~値 ~LET 要素は ``rows$a 属性を[ 有するならば その値/ 有さないならば ε ]
  2. ~IF[ %属性~値 ~NEQ ε ]:

    1. %結果 ~LET `負でない整数として構文解析する$( %属性~値 )
    2. ~IF[ %結果 ~NIN { `失敗^i, 0 } ] ⇒ ~RET %結果
  3. ~RET 2
◎ If applying the rules for parsing non-negative integers to the attribute's value results in a number greater than zero, then the element's character height is that value; otherwise, it is 2.

視覚的な~UAは、 ~controlの縦幅を`行数$で与えられる行l数に設定するベキである。 ◎ Visual user agents should set the height of the control to the number of lines given by character height.

``wrap@a 属性は,`列挙d属性$であり、 次に挙げる~keyword, とり得る状態, それらの対応付けが定義される: ◎ The wrap attribute is an enumerated attribute with the following keywords and states:

~keyword 状態 概略的な記述
`soft@v `Soft@st ~textは、 提出-時には折返されない (それでも、 描画-時には,折返され得るが)。
`hard@v `Hard@st ~textは、 提出-時には折返されるよう,~UAにより改行文字が追加される。
◎ Keyword|State|Brief description soft|Soft|Text is not to be wrapped when submitted (though can still be wrapped in the rendering). hard|Hard|Text is to have newlines added by the user agent so that the text is wrapped when it is submitted.

この属性の[ `欠落~値~用の既定の状態$/`妥当でない値~用の既定の状態$ ]は、 `Soft$st とする。 ◎ The attribute's missing value default and invalid value default are both the Soft state.

要素は、 `Hard$st 状態にある場合は, ``cols$a 属性も指定されなければナラナイ。 ◎ If the element's wrap attribute is in the Hard state, the cols attribute must be specified.

歴史的な理由から、 要素の値は,それぞれ目的が異なる 3 通りの仕方で正規化される: ◎ For historical reasons, the element's value is normalized in three different ways for three different purposes.\

要素の`~API値$feを得するための~algoは、 次の結果を返す ⇒ `改行文字を正規化する$( 要素の``生の値$ ) ◎ The algorithm for obtaining the element's API value is to return the element's raw value, with newlines normalized.

要素の`値$feは、 次の結果として定義される ⇒ `~textarea用に行lを折返す$( 要素の`~API値$fe ) ◎ The element's value is defined to be the element's API value with the textarea wrapping transformation applied.\

`~textarea用に行lを折返す@ ~algoは、 所与の ( %文字列 ) に対し,次を適用する: ◎ The textarea wrapping transformation is the following algorithm, as applied to a string:

  1. ~IF[ 要素の ``wrap$a 属性の状態 ~EQ `Hard$st ] ⇒ `実装定義$な~algoを利用して、[ 各~行lの文字~数 ~LTE `一行分の字数$ ]になるように, %文字列 の中に `LF^i を挿入する。 この要件の目的においては、 各~行lは[ %文字列 の始端, %文字列 の終端, `LF^i ]で区切られるとする。 ◎ If the element's wrap attribute is in the Hard state, insert U+000A LINE FEED (LF) characters into the string using an implementation-defined algorithm so that each line has no more than character width characters. For the purposes of this requirement, lines are delimited by the start of the string, the end of the string, and U+000A LINE FEED (LF) characters.

``maxlength@a 属性は、 ~form~control `maxlength^a 属性 である。 ◎ The maxlength attribute is a form control maxlength attribute.

[ `textarea$e 要素の`値に許容される最大~長さ$ ~NEQ ε ]の場合、 要素の子たちは,次を満たすようにするモノトスル ⇒ 次の結果の`長さ$ ~LTE 要素の`値に許容される最大~長さ$ ⇒ `改行文字を正規化する$( 要素の`子孫~text内容$ ) ◎ If the textarea element has a maximum allowed value length, then the element's children must be such that the length of the value of the element's descendant text content with newlines normalized is less than or equal to the element's maximum allowed value length.

``minlength@a 属性は、 ~form~control `minlength^a 属性 である。 ◎ The minlength attribute is a form control minlength attribute.

``required@a 属性は、 `真偽-属性$である。 指定されたときは、 利用者には,~formを提出する前に値を手入力することが 要求されることになる。 ◎ The required attribute is a boolean attribute. When specified, the user will be required to enter a value before submitting the form.

拘束~検証 ⇒ 要素が次を満たしている間は、 `欠落である難あり$になる ⇒ [ 要素は ``required$a を有する ]~AND[ 要素は`変異-可能$feである ]~AND[ 要素の`値$fe ~EQ 空~文字列 ] ◎ Constraint validation: If the element has its required attribute specified, and the element is mutable, and the element's value is the empty string, then the element is suffering from being missing.

``placeholder@a 属性は、 `短い^em~hint(または単語や短い句)を表現する。 この属性は、 ~controlが値を有さないとき,利用者を援助する~dataを与えることが意図される。 この~hintは、 見本の値や,期待される形式についての概略的な記述にすることもできる。 ◎ The placeholder attribute represents a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.

``placeholder$a 属性は `label$e の代替として利用されるベキでない。 より長い~hintや他の助言的~textには、 `title$a 属性がより適切になる。 ◎ The placeholder attribute should not be used as an alternative to a label. For a longer hint or other advisory text, the title attribute is more appropriate.

注記: これらの仕組みは互いに よく似るが、 微妙に相違する:

  • ~controlの `label$e で与えられる~hintは,いつでも示される。
  • ``placeholder$a 属性が与える短い~hintは,利用者が値を手入力する前に示される。
  • `title$a 属性~内の~hintは,利用者が更なる~helpを要請したときに示される。
◎ These mechanisms are very similar but subtly different: the hint given by the control's label is shown at all times; the short hint given in the placeholder attribute is shown before the user enters a value; and the hint in the title attribute is shown when the user requests further help.

~UAは、 要素の`値$feが空~文字列で ~controlが`~focusされ$ていないときには、 この~hintを(当の~controlの内側に表示するなどして)利用者に呈示するベキである。 ~hintの描画-時には,~hint内の各[ [ `CR^i, `LF^i ]並び, および他の `CR^i, `LF^i ]は,改行として扱うモノトスル。 ◎ User agents should present this hint to the user when the element's value is the empty string and the control is not focused (e.g. by displaying it inside a blank unfocused control). All U+000D CARRIAGE RETURN U+000A LINE FEED character pairs (CRLF) in the hint, as well as all other U+000D CARRIAGE RETURN (CR) and U+000A LINE FEED (LF) characters in the hint, must be treated as line breaks when rendering the hint.

~UAは、[ 当の~controlが`~focusされ$たとき、 通常は,この~hintを利用者に示さない ]場合でも,[ `autofocus$a 属性の結果として~focusされた場合には、 ~control用の~hintを示す ]ベキである — その事例では、 利用者が~focusする前に~controlを精査する機会は,無いので。 ◎ If a user agent normally doesn't show this hint to the user when the control is focused, then the user agent should nonetheless show the hint for the control if it was focused as a result of the autofocus attribute, since in that case the user will not have had an opportunity to examine the control before focusing it.

`textarea$e 要素の: ◎ ↓

%textarea.``type$m
文字列 `textarea^l を返す。 ◎ Returns the string "textarea".
%textarea.``value$m
この要素の現在の値を返す。 ◎ Returns the current value of the element.
設定して値を変更できる。 ◎ Can be set, to change the value.

``placeholder@m ~IDL属性は、 ``placeholder$a 内容~属性を`反映する$モノトスル。

``required@m ~IDL属性は、 ``required$a 内容~属性を`反映する$モノトスル。

``wrap@m ~IDL属性は、 ``wrap$a 内容~属性を`反映する$モノトスル。

``cols@m ~IDL属性は、 `~fallbackありの下で正な整数のみに制限され$る, かつ`既定の値$は 20 とする下で, ``cols$a 内容~属性を`反映する$モノトスル。

``rows@m ~IDL属性は、 `~fallbackありの下で正な整数のみに制限され$る, かつ`既定の値$は 2 とする下で, ``rows$a 内容~属性を`反映する$モノトスル。

◎ The cols, placeholder, required, rows, and wrap IDL attributes must reflect the respective content attributes of the same name.\ The cols and rows attributes are limited to only positive numbers with fallback.\ The cols IDL attribute's default value is 20.\ The rows IDL attribute's default value is 2.\

``dirName@m ~IDL属性は、 `dirname$a 内容~属性を`反映する$モノトスル。 ◎ The dirName IDL attribute must reflect the dirname content attribute.\

``maxLength@m ~IDL属性は、 `負でない数のみに制限され$る下で, ``maxlength$a 内容~属性を`反映する$モノトスル。 ◎ The maxLength IDL attribute must reflect the maxlength content attribute, limited to only non-negative numbers.\

``minLength@m ~IDL属性は、 `負でない数のみに制限され$る下で, ``minlength$a 内容~属性を`反映する$モノトスル。 ◎ The minLength IDL attribute must reflect the minlength content attribute, limited to only non-negative numbers.\

``readOnly@m ~IDL属性は、 ``readonly$a 内容~属性を`反映する$モノトスル。 ◎ The readOnly IDL attribute must reflect the readonly content attribute.

``type@m 取得子~手続きは ⇒ ~RET 文字列 `textarea^l ◎ The type IDL attribute must return the value "textarea".
``defaultValue@m 取得子~手続きは ⇒ ~RET コレの`子~text内容$ ◎ The defaultValue attribute's getter must return the element's child text content.
``defaultValue$m 設定子~手続きは ⇒ コレの`全~内容を文字列に置換する$( 所与の値 ) ◎ The defaultValue attribute's setter must string replace all with the given value within this element.
``value@m 取得子~手続きは ⇒ ~RET コレの`~API値$fe ◎ The value IDL attribute must, on getting, return the element's API value.\

``value$m 設定子~手続きは: ◎ On setting, it must perform the following steps:

  1. %旧~API値 ~LET コレの`~API値$fe ◎ Let oldAPIValue be this element's API value.
  2. コレの``生の値$ ~SET 所与の値 ◎ Set this element's raw value to the new value.
  3. コレの`値は~dirtyか$fe ~SET ~T ◎ Set this element's dirty value flag to true.
  4. ~IF[ コレの`~API値$fe ~NEQ %旧~API値 ]:

    1. `~text手入力~cursor位置$を終端へ移動する
    2. 選択されている~textは未~選択-にする
    3. コレの`選択~方向を設定する$( `none^l )
    ◎ If the new API value is different from oldAPIValue, then move the text entry cursor position to the end of the text control, unselecting any selected text and resetting the selection direction to "none".
``textLength@m 取得子~手続きは ⇒ ~RET コレの`~API値$feの`長さ$ ◎ The textLength IDL attribute must return the length of the element's API value.

`textarea$e 要素には、 次に挙げる~IDL~memberもある: ◎ ↓

`textarea$e を利用して,~form内に制約されない自由-形な~text入力を与える例: ◎ Here is an example of a textarea being used for unrestricted free-form text input in a form:

`textarea-2^xCode

``maxlength$a 属性を利用すれば、 ~commentの最大~長さを指定できる: ◎ To specify a maximum length for the comments, one can use the maxlength attribute:

`textarea-3^xCode

既定の値を与えるには、 要素の内側に~textを含する: ◎ To give a default value, text can be included inside the element:

`textarea-4^xCode

最小な長さも与えれる。 ここでの手紙には,(最小な長さより短い)雛形が供されているが、 ~formを提出するには不十分であり,利用者はもっと埋める必要がある: ◎ You can also give a minimum length. Here, a letter needs to be filled out by the user; a template (which is shorter than the minimum length) is provided, but is insufficient to submit the form:

`textarea-5^xCode

明示的な雛形を供さなくとも、 利用者に基本-形を示唆する仮入力を与えれる: ◎ A placeholder can be given as well, to suggest the basic form to the user, without providing an explicit template:

`textarea-6^xCode

`dirname$a 属性を指定すれば、 要素の`方向性$も値に伴わせるように,~browserに提出させられる: ◎ To have the browser submit the directionality of the element along with the value, the dirname attribute can be specified:

`textarea-7^xCode

4.10.12. ``output^e 要素

`分類$
`~flow内容$ / `句ng内容$ / `可触~内容$ / ◎ Flow content. ◎ Phrasing content. ◎ Listed, labelable, resettable, and autocapitalize-inheriting form-associated element. ◎ Palpable content.
`~formに所有され得る要素$のうち[ `~listされる$ / `~label可能$な / `再設定-可能$な / `自動頭字化-を継承-$する ]もの。 ◎ ↑
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`句ng内容$。 ◎ Phrasing content.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
``for$a — この出力を計算させた~controlを指定する。 ◎ for — Specifies controls from which the output was calculated
`form$a — この要素の所有者にする `form$e 要素を与える。 ◎ form — Associates the element with a form element
`name$a — `form.elements$m ~APIにおいて利用する,この要素の名前。 ◎ name — Name of the element to use in the form.elements API.
`~accessibilityの考慮点$
`output$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLOutputElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [SameObject, PutForwards=`value$m] readonly attribute `DOMTokenList$I ``htmlFor$m;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute DOMString `name$m;

  readonly attribute DOMString ``type$m;
  [`CEReactions$] attribute DOMString ``defaultValue$m;
  [`CEReactions$] attribute DOMString ``value$m;

  readonly attribute boolean `willValidate$m;
  readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);

  readonly attribute `NodeList$I `labels$m;
};

`output$e 要素は、[ ~appにより遂行された計算の結果 / 利用者~動作の結果 ]を`表現-$する。 ◎ The output element represents the result of a calculation performed by the application, or the result of a user action.

注記: この要素は、 `samp$e 要素と対照をなす — それは、 以前に走らせた他の~programの出力を引用するときに,適切な要素になる。 ◎ This element can be contrasted with the samp element, which is the appropriate element for quoting the output of other programs run previously.

``for@a 内容~属性は、 計算の結果と[ 計算に[ 取り込まれた/波及した ]値を表現する要素 ]との間に,明示的な関係性を与えれるようにする。 この属性に指定する値は、 `~space等で分離された~token集合$(一意)であって,その各~tokenは[ 同じ`~tree$内に在る,ある要素 ]の`~ID$の値を与えていなければナラナイ。 ◎ The for content attribute allows an explicit relationship to be made between the result of a calculation and the elements that represent the values that went into the calculation or that otherwise influenced the calculation. The for attribute, if specified, must contain a string consisting of an unordered set of unique space-separated tokens, none of which are identical to another token and each of which must have the value of an ID of an element in the same tree.

`output$e 要素の: ◎ ↓

各 `output$e 要素には、 ~form~controlの~event~handlerから容易に`参照-$できるように,~formに所有され得るが、 この要素の値が,~formの提出-時に提出されることはない。 ◎ The output element is associated with a form so that it can be easily referenced from the event handlers of form controls; the element's value itself is not submitted when the form is submitted.

各 `output$e 要素は、 ``上書き既定~値@ を有する — それは,文字列または ~NULL であり、 初期~時には ~NULL になるモノトスル。 ◎ The element has a default value override (null or a string). Initially it must be null.

各 `output$e 要素の ``既定~値@ は、 次を返す ⇒# 要素の``上書き既定~値$ ~NEQ ~NULL ならば それ / ~ELSE_ 要素の`子孫~text内容$ ◎ The element's default value is determined by the following steps: • If this element's default value override is non-null, then return it. • Return this element's descendant text content.

`output$e 要素~用の`再設定~algo$は、 次を走らす: ◎ The reset algorithm for output elements is to run these steps:

  1. 要素の`全~内容を文字列に置換する$( 要素の``既定~値$ ) ◎ String replace all with this element's default value within this element.
  2. 要素の``上書き既定~値$ ~SET ~NULL ◎ Set this element's default value override to null.
%output.``value$m [ = %value ]
この要素の現在の値を返す。 ◎ Returns the element's current value.
設定して,値を変更できる。 ◎ Can be set, to change the value.
%output.``defaultValue$m [ = %value ]
この要素の現在の既定の値を返す。 ◎ Returns the element's current default value.
設定して,既定の値を変更できる。 ◎ Can be set, to change the default value.
%output.``type$m
文字列 `output^l を返す。 ◎ Returns the string "output".
``value@m 取得子~手続きは ⇒ ~RET コレの`子孫~text内容$ ◎ The value getter steps are to return this's descendant text content.

``value$m 設定子~手続きは: ◎ The value setter steps are:

  1. コレの``上書き既定~値$ ~SET コレの``既定~値$ ◎ Set this's default value override to its default value.
  2. コレの`全~内容を文字列に置換する$( 所与の値 ) ◎ String replace all with the given value within this.
``defaultValue@m 取得子~手続きは ⇒ ~RET コレの``既定~値$ ◎ The defaultValue getter steps are to return the result of running this's default value.

``defaultValue$m 設定子~手続きは: ◎ The defaultValue setter steps are:

  1. ~IF[ コレの``上書き既定~値$ ~EQ ~NULL ] ⇒# コレの`全~内容を文字列に置換する$( 所与の値 ); ~RET 【 ~RET は余計?】 ◎ If this's default value override is null, then string replace all with the given value within this and return.
  2. コレの``上書き既定~値$ ~SET 所与の値 ◎ Set this's default value override to the given value.
``type@m 取得子~手続きは ⇒ ~RET `output^l ◎ The type getter steps are to return "output".

``htmlFor@m ~IDL属性は、 ``for$a 内容~属性を`反映する$モノトスル。 ◎ The htmlFor IDL attribute must reflect the for content attribute.

`output$e 要素には、 次に挙げる~IDL~memberもある: ◎ ↓

`output$e を利用して,単純な計算機の計算-結果を表示する例: ◎ A simple calculator could use output for its display of calculated results:

`output-1^xCode

次の例では,ある計算が~remote~serverにより遂行され、 `output$e 要素を利用して,返されて来た結果を報告する: ◎ In this example, an output element is used to report the results of a calculation performed by a remote server, as they come in:

`output-2^xCode

4.10.13. ``progress^e 要素

`分類$
`~flow内容$ / `句ng内容$ / `可触~内容$ / `~label可能$な要素 ◎ Flow content. ◎ Phrasing content. ◎ Labelable element. ◎ Palpable content.
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`句ng内容$ — ただし、 子孫に `progress$e 要素が在ってはならない。 ◎ Phrasing content, but there must be no progress element descendants.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
``value$a — 要素の現在の値 ◎ value — Current value of the element
``max$a — 範囲の上界 ◎ max — Upper bound of range
`~accessibilityの考慮点$
`progress$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLProgressElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute double ``value$m;
  [`CEReactions$] attribute double ``max$m;
  readonly attribute double ``position$m;
  readonly attribute `NodeList$I `labels$m;
};

`progress$e 要素は、 ~taskの完了~進捗を`表現-$する。 進捗は、[ `不定^i, `確定的^i ]のいずれかになる。 前者は、 進捗は ~taskが完了するまで どの程度~作業が残っているか明らかでないことを指示する(例:~taskは~remote~hostからの応答を待機しているなど)。 後者は、 それまでに完了した作業の進捗~率を { 0 〜 ある最大 } の範囲に入る数として与える。 ◎ The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed.

要素により表現される現在の~task完了を決定する 2 個の属性がある: ◎ There are two attributes that determine the current task completion represented by the element.\

注記: 進捗~barを `確定的^i にするためには、 ``value$a 属性に現在の進捗( 0.0 〜 ``最大~値$ に入る数)を伴わせて追加する。 進捗~barを `不定^i にするためには、 ``value$a 属性を除去する。 ◎ To make a determinate progress bar, add a value attribute with the current progress (either a number from 0.0 to 1.0, or, if the max attribute is specified, a number from 0 to the value of the max attribute). To make an indeterminate progress bar, remove the value attribute.

作者には、 進捗が旧来の~UAの利用者からも可用になるよう,要素の内側に 現在の値と最大~値を~textとして~inlineに含めることも奨励される。 ◎ Authors are encouraged to also include the current value and the maximum value inline as text inside the element, so that the progress is made available to users of legacy user agents.

ある自動化された~taskの進捗を示す~web~appの例: ◎ Here is a snippet of a web application that shows the progress of some automated task:

`progress-1^xCode

(この例の `updateProgress()^m ~methodは、 実際の進捗~barを更新するためにあり、 ~taskが進捗するに伴い,~page上の他の~codeから~callされることになる。) ◎ (The updateProgress() method in this example would be called by some other code on the page to update the actual progress bar as the task progressed.)

[ ``value$a / ``max$a ]属性に指定する値は、 `妥当な浮動小数点数$でなければナラナイ。 加えて、 %V, %M を次で与える値とするとき[ 0 ~LTE %V ~LTE %M ]~AND[ 0 ~LT %M ]を満たさなければナラナイ:

  • %V は、 要素は ``value$a 属性を有するならば それが表現する実数 / ~ELSE_ 0
  • %M は、 要素は ``max$a 属性を有するならば それが表現する実数 / ~ELSE_ 1.0
◎ The value and max attributes, when present, must have values that are valid floating-point numbers. The value attribute, if present, must have a value greater than or equal to zero, and less than or equal to the value of the max attribute, if present, or 1.0, otherwise. The max attribute, if present, must have a value greater than zero.

注記: `progress$e 要素を[ ~task進捗でない,単なる計器などの何か ]に利用するのは間違いである。 一例として、 `progress$e を利用して~disk消費量を指示するのは適切でない。 その種の事例には、 `meter$e 要素が用意されている。 ◎ The progress element is the wrong element to use for something that is just a gauge, as opposed to task progress. For instance, indicating disk space usage using progress would be inappropriate. Instead, the meter element is available for such use cases.

~UA要件 ⇒ 進捗~barは、[ ``value$a 属性が省略されたならば `不定^i / ~ELSE_ `確定的^i ]にする。 ◎ User agent requirements: If the value attribute is omitted, then the progress bar is an indeterminate progress bar. Otherwise, it is a determinate progress bar.

進捗~barが `確定的^i であるならば、 ~UAは,当の要素 %要素 の: ◎ ↓

進捗~barを示すときの~UA要件 ⇒ 利用者に対し `progress$e 要素を表現するときは、 ~UAは,次を指示するベキである:

  • [ `確定的^i, `不定^i ]どちらなのか
  • `確定的^i な場合、 ``最大~値$に相対的な``現在の値$の位置
◎ UA requirements for showing the progress bar: When representing a progress element to the user, the UA should indicate whether it is a determinate or indeterminate progress bar, and in the former case, should indicate the relative position of the current value relative to the maximum value.
%progress.``position$m
`確定的^i な進捗~bar(現在の最大~値が既知であるもの)に対しては[ 現在の値 ÷ 最大~値 ]を返す。 ◎ For a determinate progress bar (one with known current and maximum values), returns the result of dividing the current value by the maximum value.
`不定^i な進捗~barに対しては −1 を返す。 ◎ For an indeterminate progress bar, returns −1.
``position@m 取得子~手続きは ⇒ ~RET [ コレは `不定^i な進捗~barであるならば −1 / ~ELSE_[ コレの``現在の値$ ÷ コレの``最大~値$ ]] ◎ If the progress bar is an indeterminate progress bar, then the position IDL attribute must return −1. Otherwise, it must return the result of dividing the current value by the maximum value.
``value@m 取得子~手続きは ⇒ ~RET [ コレが `不定^i な進捗~barであるならば 0 / ~ELSE_ コレの``現在の値$ ] ◎ If the progress bar is an indeterminate progress bar, then the value IDL attribute, on getting, must return 0. Otherwise, it must return the current value.\

``value$m 設定子~手続きは ⇒ コレの ``value$m 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the value content attribute must be set to that string.

注記: 対応する内容~属性が無いときに ``value$m ~IDL属性を自身に設定すると、 進捗~barは `不定^i から進捗を伴わない `確定的^i に変化することになる。 ◎ Setting the value IDL attribute to itself when the corresponding content attribute is absent would change the progress bar from an indeterminate progress bar to a determinate progress bar with no progress.

``max@m ~IDL属性は、 `正な数のみに制限され$る, かつ`既定の値$は 1.0 とする下で, ``max$a 内容~属性を`反映する$モノトスル。 ◎ The max IDL attribute must reflect the content attribute of the same name, limited to only positive numbers. The default value for max is 1.0.

`progress$e 要素には、 次に挙げる~IDL~memberもある ⇒ `labels$m は、 要素を指している `label$e からなる~listを供する。 ◎ The labels IDL attribute provides a list of the element's labels.

4.10.14. ``meter^e 要素

`分類$
`~flow内容$ / `句ng内容$ / `可触~内容$ / `~label可能$な要素 ◎ Flow content. ◎ Phrasing content. ◎ Labelable element. ◎ Palpable content.
`この要素を利用できる文脈$
`句ng内容$が期待される所。 ◎ Where phrasing content is expected.
`内容~model$
`句ng内容$ — ただし、 子孫に `meter$e 要素が在ってはならない。 ◎ Phrasing content, but there must be no meter element descendants.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
``value$a — 要素の現在の値 ◎ value — Current value of the element
``min$a — 範囲の下界 ◎ min — Lower bound of range
``max$a — 範囲の上界 ◎ max — Upper bound of range
``low$a — 低域の上限 ◎ low — High limit of low range
``high$a — 高域の下限 ◎ high — Low limit of high range
``optimum$a — 計器における最適~値 ◎ optimum — Optimum value in gauge
`~accessibilityの考慮点$
`meter$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLMeterElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute double ``value$m;
  [`CEReactions$] attribute double ``min$m;
  [`CEReactions$] attribute double ``max$m;
  [`CEReactions$] attribute double ``low$m;
  [`CEReactions$] attribute double ``high$m;
  [`CEReactions$] attribute double ``optimum$m;
  readonly attribute `NodeList$I `labels$m;
};

`meter$e 要素は、[ ある有界な範囲の中の一次元の測定/割合~値 ]を`表現-$する。 例えば: ~disk消費量 / ~query結果の関連度 / 特定候補に対する投票割合 ◎ The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate.

これは、 計器( `gauge^en )とも呼ばれる。 ◎ This is also known as a gauge.

`meter$e 要素は、 (進捗~barのような)進捗を指示するために利用されるベキでない。 その役割には、 `progress$e 要素が別途~用意されている。 ◎ The meter element should not be used to indicate progress (as in a progress bar). For that role, HTML provides a separate progress element.

注記: `meter$e 要素は、 有界でない範囲の一次元の値は表現しない — 既知な最大~値がない限り、 例えばこれを,体重や身長を報告するために利用するのは間違いである。 ◎ The meter element also does not represent a scalar value of arbitrary range — for example, it would be wrong to use this to report a weight, or height, unless there is a known maximum value.

要素により表現される計器の意味論を決定する 6 個の属性がある: ◎ There are six attributes that determine the semantics of the gauge represented by the element.

  • [ ``min@a / ``max@a ]属性は、 範囲の[ 下界 / 上界 ]を指定する。
  • ``value@a 属性は、 計器に “測定された値” を指示する値を指定する。
◎ The min attribute specifies the lower bound of the range, and the max attribute specifies the upper bound. The value attribute specifies the value to have the gauge indicate as the "measured" value.

他の 3 個の属性は、 計器の範囲を[ “低域”, “中域”, “高域” ]に区分し,計器のどの域が “最適な域” になるかを指示するために利用できる: ◎ The other three attributes can be used to segment the gauge's range into "low", "medium", and "high" parts, and to indicate which part of the gauge is the "optimum" part.\

著作~要件: ◎ Authoring requirements:\

注記: 最小も最大も指定されない場合の範囲は, 0 以上 1 以下と見做されるので、 値は,その範囲に入る必要がある。 ◎ If no minimum or maximum is specified, then the range is assumed to be 0..1, and the value thus has to be within that range.

作者には、 `meter$e 要素を~supportしない~UAの利用者~用に,計器の状態の~textな表現を要素の内容に含めることが奨励される。 ◎ Authors are encouraged to include a textual representation of the gauge's state in the element's contents, for users of user agents that do not support the meter element.

`meter$e 要素の ``value$a 属性は、 `~microdata$と併用されるときは, 要素の機械読取可能な値を供する。 ◎ When used with microdata, the meter element's value attribute provides the element's machine-readable value.

次の例に 3 つの計器を示す — いずれも割合として 75% を指している: ◎ The following examples show three gauges that would all be three-quarters full:

`meter-1a^xCode `meter-1b^xCode `meter-1c^xCode

要素の不正な利用~例 — それは範囲を与えてないので(加えて,既定の最大は 1 になるので、 両~計器とも最大に振り切れた見かけになる): ◎ The following example is incorrect use of the element, because it doesn't give a range (and since the default maximum is 1, both of the gauges would end up looking maxed out):

`meter-2^xCode

代わりに、 `meter^e 要素を含めないか,または 範囲を定義した `meter^e 要素を利用して,他のパイと比較される文脈における寸法を与える: ◎ Instead, one would either not include the meter element, or use the meter element with a defined range to give the dimensions in context compared to other pies:

`meter-3^xCode

`meter$e 要素に明示的に単位を指定する仕方は無いが、 単位は `title$a 属性~内に自由-形な~textとして指定してもヨイ。 ◎ There is no explicit way to specify units in the meter element, but the units may be specified in the title attribute in free-form text.

上の例は、 次のように拡張すれば,単位も言及できる: ◎ The example above could be extended to mention the units:

`meter-4^xCode

~UA要件は、 以下に与えられる。 ◎ User agent requirements:\

~UAは、 次に挙げる属性の値を`浮動小数点数として構文解析する$モノトスル ⇒# ``min$a, ``max$a, ``value$a, ``low$a, ``high$a, ``optimum$a ◎ User agents must parse the min, max, value, low, high, and optimum attributes using the rules for parsing floating-point number values.

~UAは、 これらすべての実数を利用して,次に従って,計器~上の 6 点pを与える値を得するモノトスル(評価される順序は重要になる — 一部の値は、 先に得られた結果に基づくので): ◎ User agents must then use all these numbers to obtain values for six points on the gauge, as follows. (The order in which these are evaluated is important, as some of the values refer to earlier ones.)

  1. 以下においては:

    • `N^op( %属性, %既定~値 ) という表記は、 次の結果を表すとする:

      1. %属性~値 ~LET 要素は %属性 を[ 有するならば その値/ 有さないならば ε ]
      2. ~IF[ %属性~値 ~NEQ ε ]:

        1. %結果 ~LET `浮動小数点数として構文解析する$( %属性~値 )
        2. ~IF[ %結果 ~NEQ `失敗^i ] ⇒ ~RET %結果
      3. ~RET %既定~値
    • `min^op(…), `max^op(…) は、 順に,所与の引数たちの最小, 最大をとる関数とする。
    ◎ ↓
  2. ``最小~値@ は、 次で与えられる ⇒ `N^op( ``min$a, 0 ) ◎ The minimum value ◎ If the min attribute is specified and a value could be parsed out of it, then the minimum value is that value. Otherwise, the minimum value is zero.
  3. ``最大~値@ は、 次で与えられる ⇒ `max^op ( ``最小~値$, `N^op( ``max$a, 1.0 ) ) ◎ The maximum value ◎ If the max attribute is specified and a value could be parsed out of it, then the candidate maximum value is that value. Otherwise, the candidate maximum value is 1.0. ◎ If the candidate maximum value is greater than or equal to the minimum value, then the maximum value is the candidate maximum value. Otherwise, the maximum value is the same as the minimum value.
  4. ``実際の値@ は、 次で与えられる ⇒ `min^op( `max^op( ``最小~値$, `N^op( ``value$a, 0 ) ), ``最大~値$ ) ◎ The actual value ◎ If the value attribute is specified and a value could be parsed out of it, then that value is the candidate actual value. Otherwise, the candidate actual value is zero. ◎ If the candidate actual value is less than the minimum value, then the actual value is the minimum value. ◎ Otherwise, if the candidate actual value is greater than the maximum value, then the actual value is the maximum value. ◎ Otherwise, the actual value is the candidate actual value.
  5. ``下界@ は、 次で与えられる ⇒ `min^op( `max^op( ``最小~値$, `N^op( ``low$a, ``最小~値$ ) ), ``最大~値$ ) ◎ The low boundary ◎ If the low attribute is specified and a value could be parsed out of it, then the candidate low boundary is that value. Otherwise, the candidate low boundary is the same as the minimum value. ◎ If the candidate low boundary is less than the minimum value, then the low boundary is the minimum value. ◎ Otherwise, if the candidate low boundary is greater than the maximum value, then the low boundary is the maximum value. ◎ Otherwise, the low boundary is the candidate low boundary.
  6. ``上界@ は、 次で与えられる ⇒ `min^op( `max^op( ``下界$, `N^op( ``value$a, ``最大~値$ ) ), ``最大~値$ ) ◎ The high boundary ◎ If the high attribute is specified and a value could be parsed out of it, then the candidate high boundary is that value. Otherwise, the candidate high boundary is the same as the maximum value. ◎ If the candidate high boundary is less than the low boundary, then the high boundary is the low boundary. ◎ Otherwise, if the candidate high boundary is greater than the maximum value, then the high boundary is the maximum value. ◎ Otherwise, the high boundary is the candidate high boundary.
  7. ``最適~点p@ は、 次で与えられる ⇒ `min^op( `max^op( ``最小~値$, %N ) ), ``最大~値$ ) — ここで ⇒ %N ~EQ `N^op( ``optimum$a, ( ( ``最小~値$ + ``最大~値$ ) ÷ 2 ) ) ◎ The optimum point ◎ If the optimum attribute is specified and a value could be parsed out of it, then the candidate optimum point is that value. Otherwise, the candidate optimum point is the midpoint between the minimum value and the maximum value. ◎ If the candidate optimum point is less than the minimum value, then the optimum point is the minimum value. ◎ Otherwise, if the candidate optimum point is greater than the maximum value, then the optimum point is the maximum value. ◎ Otherwise, the optimum point is the candidate optimum point.

これらすべての結果は、 次の不等式を満たす: ◎ All of which will result in the following inequalities all being true:

計器の各~域に対する~UA要件: ◎ UA requirements for regions of the gauge:\

計器を示すときの~UA要件 ⇒ `meter$e 要素を利用者~向けに表現するときは、 ~UAは,[ 最小/最大 ]値から相対的な実際の値の位置, および 実際の値と計器の 3 域との関係性を指示するベキである。 ◎ UA requirements for showing the gauge: When representing a meter element to the user, the UA should indicate the relative position of the actual value to the minimum and maximum values, and the relationship between the actual value and the three regions of the gauge.

次の~markupは…: ◎ The following markup:

`meter-5^xCode

…次のように描画されるであろう: ◎ Might be rendered as follows:

種々の長さの緑色~barで~inlineに描画される `meter$e 要素 ◎ With the <meter> elements rendered as inline green bars of varying lengths.

~UAは、 `title$a 属性や他の属性の値を組合せて,文脈に応じた~helpや実際の値の詳細を~~述べる~textを~inlineに供してヨイ。 ◎ User agents may combine the value of the title attribute and the other attributes to provide context-sensitive help or inline text detailing the actual values.

例えば、 次の~code片に対しては…: ◎ For example, the following snippet:

`meter-6^xCode

… ~UAは、 表示する計器に次のような 2 行の~tooltipを伴わせ得る ⇒# “値は 23.2 です(範囲 0 〜 60 )。” “秒数” ◎ ...might cause the user agent to display a gauge with a tooltip saying "Value: 23.2 out of 60." on one line and "seconds" on a second line.

``value@m 取得子~手続きは ⇒ ~RET コレの``実際の値$ ◎ The value IDL attribute, on getting, must return the actual value.\
``value$m 設定子~手続きは ⇒ コレの ``value$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the value content attribute must be set to that string.
``min@m 取得子~手続きは ⇒ ~RET コレの``最小~値$ ◎ The min IDL attribute, on getting, must return the minimum value.\
``min$m 設定子~手続きは ⇒ コレの ``min$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the min content attribute must be set to that string.
``max@m 取得子~手続きは ⇒ ~RET コレの``最大~値$ ◎ The max IDL attribute, on getting, must return the maximum value.\
``max$m 設定子~手続きは ⇒ コレの ``max$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the max content attribute must be set to that string.
``low@m 取得子~手続きは ⇒ ~RET コレの``下界$ ◎ The low IDL attribute, on getting, must return the low boundary.\
``low$m 設定子~手続きは ⇒ コレの ``low$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the low content attribute must be set to that string.
``high@m 取得子~手続きは ⇒ ~RET コレの``上界$ ◎ The high IDL attribute, on getting, must return the high boundary.\
``high$m 設定子~手続きは ⇒ コレの ``high$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the high content attribute must be set to that string.
``optimum@m 取得子~手続きは ⇒ ~RET コレの``最適~点p$ ◎ The optimum IDL attribute, on getting, must return the optimum value.\
``optimum$m 設定子~手続きは ⇒ コレの ``optimum$a 内容~属性を[ 所与の値を`浮動小数点数として最良な表現$に変換した結果 ]に設定する ◎ On setting, the given value must be converted to the best representation of the number as a floating-point number and then the optimum content attribute must be set to that string.

`meter$e 要素には、 次に挙げる~IDL~memberもある ⇒ `labels$m は、 要素を指している `label$e からなる~listを供する。 ◎ The labels IDL attribute provides a list of the element's labels.

計器を[ 地域化された/平文による ]~textに~fall-backできるようにもする例: ◎ The following example shows how a gauge could fall back to localized or pretty-printed text.

`meter-7^xCode

4.10.15. ``fieldset^e 要素

`分類$
`~flow内容$ / `可触~内容$ ◎ Flow content. ◎ Listed and autocapitalize-inheriting form-associated element. ◎ Palpable content.
`~formに所有され得る要素$のうち[ `~listされる$ / `自動頭字化-を継承-$する ]もの。 ◎ ↑
`この要素を利用できる文脈$
`~flow内容$が期待される所。 ◎ Where flow content is expected.
`内容~model$
[[ 0 〜 1 個の `legend$e 要素 ], `~flow内容$ ]の並び。 ◎ Optionally a legend element, followed by flow content.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
``disabled$a — この~form~controlの子孫のうち[ `legend$e の内側にあるもの以外のもの ]は不能化される。 ◎ disabled — Whether the descendant form controls, except any inside legend, are disabled
`form$a — この要素の所有者にする `form$e 要素を与える。 ◎ form — Associates the element with a form element
`name$a — `form.elements$m ~APIにおいて利用する,この要素の名前。 ◎ name — Name of the element to use in the form.elements API.
`~accessibilityの考慮点$
`fieldset$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLFieldSetElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  [`CEReactions$] attribute boolean ``disabled$m;
  readonly attribute `HTMLFormElement$I? `form$m;
  [`CEReactions$] attribute DOMString `name$m;

  readonly attribute DOMString ``type$m;

  [SameObject] readonly attribute `HTMLCollection$I ``elements$m;

  readonly attribute boolean `willValidate$m;
  [SameObject] readonly attribute `ValidityState$I `validity$m;
  readonly attribute DOMString `validationMessage$m;
  boolean `checkValidity$m();
  boolean `reportValidity$m();
  undefined `setCustomValidity$m(DOMString %error);
};

`fieldset$e 要素は、 一緒に~group化される~form~control(および他の内容)の集合を`表現-$し,任意選択で,~captionも伴う。 この~captionは、[ `fieldset$e 要素の`~legend$ ~NEQ ε ]ならば,それで与えられる。 `~legend$以外の子孫が~groupを形成する。

`fieldset$e 要素の `~legend@ は、 要素の子に `legend$e 要素は[ 在るならば それらのうち`~tree順序$で最初のもの / 無いならば ε(~~存在しない) ]とする。

◎ The fieldset element represents a set of form controls (or other content) grouped together, optionally with a caption. The caption is given by the first legend element that is a child of the fieldset element, if any. The remainder of the descendants form the group.

`fieldset$e 要素が ``disabled@a 属性を有する場合、 要素の`~legend$を除く,要素~内のすべての~form~controlを`不能化する@~HTMLforms#concept-fe-disabled$。 ◎ The disabled attribute, when specified, causes all the form control descendants of the fieldset element, excluding those that are descendants of the fieldset element's first legend element child, if any, to be disabled.

`fieldset$e 要素は、 ~OR↓ を満たすとき ``不能化されて@ いるとされる: ◎ A fieldset element is a disabled fieldset if it matches any of the following conditions:

`fieldset$e 要素の: ◎ ↓

%fieldset.``type$m
文字列 `fieldset^l を返す。 ◎ Returns the string "fieldset".
%fieldset.``elements$m
この要素~内にある~form~controlからなる `HTMLCollection$I を返す。 ◎ Returns an HTMLCollection of the form controls in the element.

``disabled@m ~IDL属性は、 ``disabled$a 内容~属性を`反映する$モノトスル。 ◎ The disabled IDL attribute must reflect the content attribute of the same name.

``type@m 取得子~手続きは ⇒ ~RET 文字列 `fieldset^l ◎ The type IDL attribute must return the string "fieldset".
``elements@m 取得子~手続きは ⇒ ~RET 次のようにされた `HTMLCollection$I ⇒# 根 ~SET コレ, ~filterは`~listされる$要素に合致する ◎ The elements IDL attribute must return an HTMLCollection rooted at the fieldset element, whose filter matches listed elements.

`fieldset$e 要素には、 次に挙げる~IDL~memberもある: ◎ ↓

`fieldset$e 要素を利用して、 関係する一連の~controlを~groupにまとめる例: ◎ This example shows a fieldset element being used to group a set of related controls:

`fieldset-1^xCode

次の~code片に, `fieldset^e の `legend^e 内に[ `fieldset^e が可能化されるかどうかを制御する~checkbox ]を伴わせる例を示す。 `fieldset^e の内容は、[ 2 個の必須の~text~controlと, 省略可能な年月t~control ]からなる。 ◎ The following snippet shows a fieldset with a checkbox in the legend that controls whether or not the fieldset is enabled. The contents of the fieldset consist of two required text controls and an optional year/month control.

`fieldset-2^xCode

`fieldset$e 要素は入子にできる。 前の例を~~拡張してそうする例: ◎ You can also nest fieldset elements. Here is an example expanding on the previous one that does so:

`fieldset-3^xCode

この例では、 外縁の "会員カードを使う" ~checkboxは,~checkされておらず、 外縁 `fieldset$e の内側にある すべては, 2 個の~radio~button — それぞれは入子な `fieldset$e の `legend^e 内にある — も含め,不能化されることになるが、 その~checkboxが~checkされた場合,両~radio~buttonとも可能化され、 2 個の内縁 `fieldset$e のどちらかを可能化させるよう,選択できるようにする。 ◎ In this example, if the outer "Use Club Card" checkbox is not checked, everything inside the outer fieldset, including the two radio buttons in the legends of the two nested fieldsets, will be disabled. However, if the checkbox is checked, then the radio buttons will both be enabled and will let you select which of the two inner fieldsets is to be enabled.

~controlを~group化する例。 ~groupを~labelする `legend$e 要素は — ~groupが文書の~outline内に表面化するよう — 見出し要素を入子にしている: ◎ This example shows a grouping of controls where the legend element both labels the grouping, and the nested heading element surfaces the grouping in the document outline:

`fieldset-4^xCode

4.10.16. ``legend^e 要素

`分類$
なし。 ◎ None.
`この要素を利用できる文脈$
`fieldset$e 要素の`最初の子$として。 ◎ As the first child of a fieldset element.
`内容~model$
`句ng内容$。 加えて,`見出し内容$が~~混在していてもよい。 ◎ Phrasing content, optionally intermixed with heading content.
`text/html における~tag省略$
両~tagとも省略不可。 ◎ Neither tag is omissible.
`内容~属性$
`大域~属性$ ◎ Global attributes
`~accessibilityの考慮点$
`legend$AA ◎ For authors. For implementers.
`~DOM~interface$
[Exposed=Window]
interface `HTMLLegendElement@I : `HTMLElement$I {
  [`HTMLConstructor$] constructor();

  readonly attribute `HTMLFormElement$I? ``form$m;

  // `HTMLLegendElement$obsMb
};

`legend$e 要素は、 親が `fieldset$e 要素ならば,[ 自身以外の,親の内容 ]用の~captionを`表現-$する。 ◎ The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any.

%legend.``form$m
要素が属する `form$e 要素が[ 在るならば それ / 無いならば ~NULL ]を返す。 ◎ Returns the element's form element, if any, or null otherwise.

``form@m 取得子~手続きは: ◎ The form IDL attribute's behavior depends on whether the legend element is in a fieldset element or not.\

  1. ~IF[ コレの親は `fieldset$e 要素である ] ⇒ ~RET コレの親の `form$m 取得子~手続き() ◎ If the legend has a fieldset element as its parent, then the form IDL attribute must return the same value as the form IDL attribute on that fieldset element.\
  2. ~RET ~NULL ◎ Otherwise, it must return null.