<IS>

legend 要素 (HTML)

legend 要素型 (HTML, XHTML 1)

[1] legnend は、 fieldset (caption) を割当てます。

[2] 仕様書:

[3]

状態
W3C 勧告
名前空間URI
http://www.w3.org/1999/xhtml
局所名
legend ( (legend) より)
開始タグ
必須
終了タグ
必須
内容模型
(%inline)*
出現できる文脈
fieldset の最初に1つ (必須)
属性
属性名属性値既定値説明出典
accesskey%Character[HTML 4]
align配置[HTML 4] 非推奨
class(なし)[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] CoreCommon
dir書字方向[HTML 4] %i18n ⊂ %attrs, [XHTML 1] I18N ⊂ Common
form廃止Web Applications 1.0
idID(なし)一意識別子[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common
lang自然言語[HTML 4] %i18n ⊂ %attrs
xml:lang自然言語[XHTML 1] I18N ⊂ Common
onclick%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
ondblclick%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeydown%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeypress%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onkeyup%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmousedown%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmousemove%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseout%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseover%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
onmouseup%Script(なし)[HTML 4] %events ⊂ %attrs, [XHTML 1] Events ⊂ Common
styleスタイル情報[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Style ⊂ Common
title注釈的題[HTML 4] %coreattrs ⊂ %attrs, [XHTML 1] Core ⊂ Common

内容モデル

[6] Web Forms 2.0 のメモ IW:WF2:"#emptyElements" によれば、 HTML 4 では legend は最低1文字内容が必要だとされています。

これは HTML 4 のどの部分が根拠でしょうか?

[7] Web Forms 2.0 では、 legend 要素して構いません。 しかし、利用者の混乱を防ぐため、 かつ可視な状態は避けるようにするべきですWF2 2.3

アクセス可能性

[4] legend は非視覚レンダリングでのアクセス可能性を高めます HTML 4 17.10

関連

[5] fieldset 要素に対する legend 要素は、

と同じような関係にあります。

歴史

HTML4

[30] Design Issues for HTML Forms, , https://www.w3.org/TR/WD-forms-960308.html

[216] HTML要素概説
要素名
is
日付
説明
W3C 文書で is が提案されていた。 現在の legend に近いが、 ラベルと内容を区切るものだった。
出典

[32] Cougar では caption が使われていました。 HTML 4.0 になって legend になりました。 fieldset

HTML5

[31] the legend element (if anyone has a better idea of how to classify th…, Hixie, , https://github.com/whatwg/html/commit/967ec89c0f160d612c30aa584f271674f7089f2f#diff-41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d

[48] HTML要素概説
要素名
legend
日付
説明
HTML5legend を定義した。 現行仕様である。
出典
参照
summary
参照
figcaption
参照
dt

[77] (X)HTML5 Tracking ( 版) http://html5.org/tools/web-apps-tracker?from=4114&to=4115

[78] IRC logs: freenode / #whatwg / 20090903 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20090903#l-31

[79] IRC logs: freenode / #whatwg / 20100211 ( 版) http://krijnhoetmer.nl/irc-logs/whatwg/20100211#l-145

[80] Web Applications 1.0 r5504 make the legend rendering requirements only apply when they make senseFixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10547 ( ( 版)) http://html5.org/tools/web-apps-tracker?from=5503&to=5504

[81] Web Applications 1.0 r7987 Make <legend> styles match reality. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=7986&to=7987

[8] Editorial: Cross-reference DOM "child" where appropriate in rendering (zcorpan著, ) https://github.com/whatwg/html/commit/e8c91c05edc8d6cdb33fdd5452e052359d40490b

[9] The "rendered legend" creates a new block formatting context (zcorpan著, ) https://github.com/whatwg/html/commit/7ef15998b3a968f0fd7eb30dc126427e13349dbe

[10] Refer to a fieldset's legend as a caption to reduce confusion (zcorpan著, ) https://github.com/whatwg/html/commit/169413911523380c64d5ec66a60bed1992bdc7ca

[11] Name of <fieldset> group given by <legend> and <fieldset name=""> confusable · Issue #3702 · whatwg/html () https://github.com/whatwg/html/issues/3702

[12] Refer to a fieldset's legend as a caption to reduce confusion by zcorpan · Pull Request #3951 · whatwg/html () https://github.com/whatwg/html/pull/3951

[13] Tweak how accesskey on legend works (zcorpan著, ) https://github.com/whatwg/html/commit/aa374be03beebf25ed33022846c2d03d3ea03484

[14] focus() on a non-focusable legend delegates focus in WebKit/Chromium · Issue #3950 · whatwg/html () https://github.com/whatwg/html/issues/3950

[15] Tweak how accesskey on legend works by zcorpan · Pull Request #3987 · whatwg/html () https://github.com/whatwg/html/pull/3987

[16] Clarify which legend/figcaption/caption element to use (#146) (@zcorpan著, ) https://github.com/w3c/html-aam/commit/f311fe023964e1536e2f7d389aa02da6a824a741

[17] Unclear which legend element to be used as accessible name for fieldset · Issue #145 · w3c/html-aam () https://github.com/w3c/html-aam/issues/145

[18] Clarify which legend/figcaption/caption element to use by zcorpan · Pull Request #146 · w3c/html-aam () https://github.com/w3c/html-aam/pull/146

[19] Revamp how fieldset and legend rendering is defined (zcorpan著, ) https://github.com/whatwg/html/commit/6fbb7ff8fbe1c76506145ba8ffce690224be66e0

[20] Define whether fieldset's legend should mask border-image · Issue #3930 · whatwg/html () https://github.com/whatwg/html/issues/3930

[21] Define how margin-top on fieldset's legend works · Issue #3929 · whatwg/html () https://github.com/whatwg/html/issues/3929

[22] fieldset's "rendered legend" should force used value of display to block · Issue #3927 · whatwg/html () https://github.com/whatwg/html/issues/3927

[23] fieldset's legend should probably inherit alignment · Issue #3913 · whatwg/html () https://github.com/whatwg/html/issues/3913

[24] The definition of "rendered legend" should use the box tree, or at least the flat tree. · Issue #3331 · whatwg/html () https://github.com/whatwg/html/issues/3331

[25] Unresolvable dependencies in determining the rendered fieldset legend · Issue #2756 · whatwg/html () https://github.com/whatwg/html/issues/2756

[26] Revamp how fieldset and legend rendering is defined by zcorpan · Pull Request #3934 · whatwg/html () https://github.com/whatwg/html/pull/3934

[27] Refer to a fieldset's legend as a caption to reduce confusion (zcorpan著, ) https://github.com/whatwg/html/commit/169413911523380c64d5ec66a60bed1992bdc7ca

[28] Name of <fieldset> group given by <legend> and <fieldset name=""> confusable · Issue #3702 · whatwg/html () https://github.com/whatwg/html/issues/3702

[29] Refer to a fieldset's legend as a caption to reduce confusion by zcorpan · Pull Request #3951 · whatwg/html () https://github.com/whatwg/html/pull/3951