Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace current outline algorithm with one based on heading levels #7829

Merged
merged 45 commits into from
Jul 1, 2022
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1065688
removed outline algorithm
stevefaulkner Apr 17, 2022
f86c397
clarify allowed content of hgroup
stevefaulkner Apr 17, 2022
e96100f
updated headings and sections
stevefaulkner Apr 18, 2022
7ffe0bd
removed sectioning root concept
stevefaulkner Apr 18, 2022
6b5cc4c
fixed conflict
stevefaulkner Apr 19, 2022
0d2fa7b
another fix?
stevefaulkner Apr 19, 2022
3d23dab
added return h1
stevefaulkner Apr 19, 2022
88bc37a
Fix build errors
sideshowbarker Apr 20, 2022
f5f3917
Fix markup error caught by HTML checker
sideshowbarker Apr 20, 2022
d7a8d50
Revert markup change that added p element in hgroup
sideshowbarker Apr 20, 2022
5b3e474
several clarifications
stevefaulkner Apr 21, 2022
09e8490
fix linting errors
stevefaulkner Apr 21, 2022
0327b04
Merge branch 'whatwg:main' into outline-reality-reset
stevefaulkner Apr 21, 2022
71cd1d1
remove rank in reference to headings
stevefaulkner Apr 21, 2022
cce4797
WIP Some updates based on code review
stevefaulkner Apr 27, 2022
4b5a5d3
fix linting error
stevefaulkner Apr 27, 2022
91f864c
remove mention of CSS sticky
stevefaulkner Apr 27, 2022
7ac1373
restored hr note
stevefaulkner Apr 27, 2022
0fbbc0d
removed Generic
stevefaulkner Apr 27, 2022
817c59a
replace document headings with outline
stevefaulkner Apr 27, 2022
b2207d3
fix lint error
stevefaulkner Apr 27, 2022
03d27be
added back heading content category
stevefaulkner Apr 27, 2022
b595cbd
Zap trailing whitespace (unbreak CI)
sideshowbarker Apr 28, 2022
5f7ae31
update hgroup content model
stevefaulkner Apr 28, 2022
0c07285
replaced important term
stevefaulkner May 2, 2022
e841164
Minor editorial fixes
domenic May 3, 2022
5543e9c
updated example and svg
stevefaulkner May 4, 2022
0096441
reworked hgroup definition
stevefaulkner May 5, 2022
efbe168
added back header clarification
stevefaulkner May 5, 2022
8c1cb5e
add example
stevefaulkner May 5, 2022
2242b9d
added example
stevefaulkner May 5, 2022
2d0b9bb
removed trailing whitespace
stevefaulkner May 5, 2022
5754ddd
Merge branch 'main' into outline-reality-reset
stevefaulkner May 8, 2022
045cf00
various updates
stevefaulkner May 8, 2022
d07cf54
lint fix
stevefaulkner May 8, 2022
ea5492b
typo fix
stevefaulkner May 8, 2022
559d70b
removed note
stevefaulkner May 8, 2022
052efb0
Minor fixes
domenic Jun 22, 2022
becd7b3
Attempt to fix remaining review comments
domenic Jun 23, 2022
a1b9930
This link no longer seems relevant
domenic Jun 23, 2022
9014ace
Updates from zcorpan's review
domenic Jun 29, 2022
71928c0
Remove "sectioning root" again
domenic Jun 29, 2022
de7ac7b
Add back "Exposing outlines to users"; various example tweaks
domenic Jun 29, 2022
a7004a9
Fix extra "ancestor"
domenic Jun 29, 2022
dd81361
Add missing "None" for td category
domenic Jul 1, 2022
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix build errors
  • Loading branch information
sideshowbarker committed Apr 20, 2022
commit 88bc37ac857744e8b99ec9cacf6cc8db5d4b606e
39 changes: 19 additions & 20 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2084,8 +2084,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<p>Applications and tools that process HTML and XML documents for reasons other than to either
render the documents or check them for conformance should act in accordance with the semantics
of the documents that they process.</p>
<p class="example">A tool that generates document outlines but increases the nesting level for

<p class="example">A tool that generates document outlines but increases the nesting level for
each paragraph and does not increase the nesting level for <span
data-x="concept-heading">headings</span> would not be conforming.</p>
</dd>
Expand Down Expand Up @@ -17066,7 +17066,6 @@ interface <dfn interface>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
<p>Authors might prefer the former style for its terseness, or the latter style for its
convenience in the face of heavy editing; which is best is purely an issue of preferred authoring
style.</p>

</div>


Expand All @@ -17080,8 +17079,8 @@ interface <dfn interface>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
<dd>Where <span>heading content</span> is expected.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd>One <code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>,
<code>h5</code>, <code>h6</code> element, optionally with one or more <code>p</code> elements,
optionally intermixed with <span>script-supporting elements</span>.</dd>
<code>h5</code>, <code>h6</code> element, optionally with one or more <code>p</code> elements,
optionally intermixed with <span>script-supporting elements</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
stevefaulkner marked this conversation as resolved.
Show resolved Hide resolved
<dd><span>Global attributes</span></dd>
<dt><span
Expand All @@ -17092,13 +17091,14 @@ interface <dfn interface>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
<dd>Uses <code>HTMLElement</code>.</dd>
</dl>

<p>The <code>hgroup</code> element has no special meaning at all. It <span>represents</span> its children.
The element may be used to group a <code>h1</code>&ndash;<code>h6</code> element, for styling purposes,
with one or more <code>p</code> elements containing text representing its subheading, alternative title, or tagline.</p>
<p>The <code>hgroup</code> element <span>represents</span> its children. It otherwise has no
special meaning at all. The element may be used to group <code>h1</code>&ndash;<code>h6</code>
elements, for styling purposes, with one or more <code>p</code> elements containing text
representing its subheading, alternative title, or tagline.</p>

<div class="example">

<p>Here are some examples of valid headings contained within a <code>hgroup</code> element.</p>
<p>Here are some examples of valid headings contained within an <code>hgroup</code> element.</p>

<pre><code class="html">&lt;hgroup&gt;
&lt;h1&gt;The reality dysfunction&lt;/h1&gt;
domenic marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -17473,22 +17473,21 @@ interface <dfn interface>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {



<h4><dfn>Headings and sections</dfn></h4>
<h4><dfn>Headings and sections</dfn></h4>

<p><span>Heading content</span> elements have a <dfn>heading level</dfn>, which is
an unsigned integer. It is determined as follows for a given <span>heading content</span> element
<p><span>Heading content</span> elements have a <dfn>heading level</dfn>, which is an unsigned
integer. It is determined as follows for a given <span>heading content</span> element
<var>heading</var>:</p>

<ol>

<li>
<p>Switch on <var>heading</var>:</p>

domenic marked this conversation as resolved.
Show resolved Hide resolved
<dl class="switch">
<dt><code>h1</code></dt>
<dt><code>h1</code></dt>
<dd>Return 1.</dd>
stevefaulkner marked this conversation as resolved.
Show resolved Hide resolved
<dt><code>h2</code></dt>

<dt><code>h2</code></dt>
<dd>Return 2.</dd>

<dt><code>h3</code></dt>
Expand All @@ -17504,12 +17503,12 @@ interface <dfn interface>HTMLHeadingElement</dfn> : <span>HTMLElement</span> {
<dd>Return 6.</dd>
</dl>
</li>

</ol>

<p>A <span>heading content</span> element <span>represents</span> a <dfn data-x="concept-heading">heading</dfn>.
The lower a <span data-x="concept-heading">heading</span>'s <span>heading level</span> is, the more important
the <span data-x="concept-heading">heading</span> is.</p>
<p>A <span>heading content</span> element <span>represents</span> a <dfn
data-x="concept-heading">heading</dfn>. The lower a <span
data-x="concept-heading">heading</span>'s <span>heading level</span> is, the more important the
<span data-x="concept-heading">heading</span> is.</p>

<p>The <dfn>document headings</dfn> are all <span data-x="concept-heading">headings</span> in a
document, in <span>tree order</span>.</p>
Expand Down