From ca2306356695df346874776e4466705dfd0c5f1e Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Fri, 15 Nov 2019 09:29:30 -0500
Subject: [PATCH 01/10] allow heading content as child of legend
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR updates the `legend`’s content model to allow for heading content, using the `summary` element’s content model as the template for how I think this should be indicated in the spec.
If accepted, this closes #4990
Thanks
---
source | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source b/source
index da9b567bde7..3e038f09f15 100644
--- a/source
+++ b/source
@@ -52679,7 +52679,8 @@ interface HTMLFieldSetElement : HTMLElement {
Contexts in which this element can be used:
As the first child of a fieldset
element.
Content model:
- Phrasing content.
+ Either: phrasing content.
+ Or: one element of heading content.
Content attributes:
Global attributes
DOM interface:
From a09f9f1fce450fe907c38869a3a5fd98d89c3ee8 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Mon, 25 Nov 2019 12:27:00 -0500
Subject: [PATCH 02/10] adjust wording per feedback
---
source | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/source b/source
index 3e038f09f15..a73c9432908 100644
--- a/source
+++ b/source
@@ -52679,8 +52679,7 @@ interface HTMLFieldSetElement : HTMLElement {
Contexts in which this element can be used:
As the first child of a fieldset
element.
Content model:
- Either: phrasing content.
- Or: one element of heading content.
+ Phrasing content, optionally intermixed with heading content.
Content attributes:
Global attributes
DOM interface:
From 6564f00339c52ea674496b27a1e4064e14450b17 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Tue, 26 Nov 2019 10:14:35 -0500
Subject: [PATCH 03/10] update summary content model
as per the update to `legend`, update `summary` to allow phrasing content optionally intermixed with heading content.
---
source | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/source b/source
index a73c9432908..6b2d8fcdbe0 100644
--- a/source
+++ b/source
@@ -57345,8 +57345,7 @@ interface HTMLDetailsElement : HTMLElement {
Contexts in which this element can be used:
As the first child of a details
element.
Content model:
- Either: phrasing content.
- Or: one element of heading content.
+ Phrasing content, optionally intermixed with heading content.
Content attributes:
Global attributes
DOM interface:
From 1313542cfb9cea71017b587ce13153a1a768e900 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sun, 2 Feb 2020 10:01:45 -0500
Subject: [PATCH 04/10] can be used where heading content is expected
---
source | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source b/source
index 6b2d8fcdbe0..d5c35087376 100644
--- a/source
+++ b/source
@@ -16213,7 +16213,7 @@ isn't his only passion. He also enjoys other pleasures.</p>
Palpable content.
Contexts in which this element can be used:
As a child of an hgroup
element.
- Where flow content is expected.
+ Where flow content or heading content is expected.
Content model:
Phrasing content.
Content attributes:
@@ -16310,7 +16310,7 @@ interface HTMLHeadingElement : HTMLElement {
Heading content.
Palpable content.
Contexts in which this element can be used:
- Where flow content is expected.
+ Where flow content or heading content is expected.
Content model:
One or more h1
, h2
, h3
, h4
,
h5
, h6
elements, optionally intermixed with script-supporting
From f36d88390bdb3df8f037f91100809db3c70cca92 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Wed, 12 Feb 2020 17:46:46 -0500
Subject: [PATCH 05/10] update indeces
---
source | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/source b/source
index d5c35087376..ef5df7ed720 100644
--- a/source
+++ b/source
@@ -119594,6 +119594,7 @@ interface External {
heading;
palpable
hgroup ;
+ legend ;
flow |
phrasing |
globals |
@@ -119627,7 +119628,9 @@ interface External {
flow;
heading;
palpable |
- flow |
+
+ legend ;
+ flow |
h1 ;
h2 ;
h3 ;
@@ -119816,7 +119819,8 @@ interface External {
| Caption for fieldset |
none |
fieldset |
- phrasing |
+ phrasing;
+ heading content |
globals |
HTMLLegendElement |
From 1defa45619a4eade0cbf68c5b31d1c5791055641 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Wed, 12 Feb 2020 22:21:35 -0500
Subject: [PATCH 06/10] add example
---
source | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/source b/source
index ef5df7ed720..d063b71b4cf 100644
--- a/source
+++ b/source
@@ -52670,6 +52670,31 @@ interface HTMLFieldSetElement : HTMLElement {
+
+
+
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>
+ <legend> <h1>
+ How can we best reach you?
+ </h1> </legend>
+ <p> <label>
+ <input type=radio checked name=contact_pref>
+ Phone
+ </label> </p>
+ <p> <label>
+ <input type=radio name=contact_pref>
+ Text
+ </label> </p>
+ <p> <label>
+ <input type=radio name=contact_pref>
+ Email
+ </label> </p>
+</fieldset>
+
+
+
The legend
element
From cadd40bde9df320b85b363d34122a775096306f8 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Thu, 13 Feb 2020 07:42:16 -0500
Subject: [PATCH 07/10] add missing end tags to example
---
source | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source b/source
index d063b71b4cf..e2f5e88af8f 100644
--- a/source
+++ b/source
@@ -52691,7 +52691,7 @@ interface HTMLFieldSetElement : HTMLElement {
<input type=radio name=contact_pref>
Email
</label> </p>
-</fieldset>
+</fieldset>
From 8e1df864ac54be16de3f7a3f57804cca8ffb46ab Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Thu, 13 Feb 2020 10:24:09 -0500
Subject: [PATCH 08/10] resolve comments
---
source | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/source b/source
index e2f5e88af8f..941764c08c7 100644
--- a/source
+++ b/source
@@ -119618,7 +119618,7 @@ interface External {
flow;
heading;
palpable |
- hgroup ;
+ | summary ;
legend ;
flow |
phrasing |
@@ -119655,6 +119655,7 @@ interface External {
palpable
legend ;
+ summary ;
flow |
h1 ;
h2 ;
@@ -120390,7 +120391,8 @@ interface External {
| Caption for details |
none |
details |
- phrasing |
+ phrasing;
+ heading content |
globals |
HTMLElement |
From e64d9d90c9ebbcbae0e702880151ca714228f258 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Thu, 13 Feb 2020 10:28:20 -0500
Subject: [PATCH 09/10] reorder elements
---
source | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source b/source
index 941764c08c7..746fe6f15e1 100644
--- a/source
+++ b/source
@@ -119618,8 +119618,8 @@ interface External {
flow;
heading;
palpable |
- summary ;
- legend ;
+ | legend ;
+ summary ;
flow |
phrasing |
globals |
From 63d439986122af5e7c97e3bddd01197389961f38 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Tue, 18 Feb 2020 17:53:37 -0500
Subject: [PATCH 10/10] change h1 to h2
---
source | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source b/source
index 746fe6f15e1..ee14da4e6cb 100644
--- a/source
+++ b/source
@@ -52676,9 +52676,9 @@ interface HTMLFieldSetElement : HTMLElement {
the grouping, and the nested heading element surfaces the grouping in the document outline:
<fieldset>
- <legend> <h1>
+ <legend> <h2>
How can we best reach you?
- </h1> </legend>
+ </h2> </legend>
<p> <label>
<input type=radio checked name=contact_pref>
Phone