From c35fc237a74e592dc4c269f9af9e46a7a468f81d Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 17 Apr 2018 11:25:28 -0400 Subject: [PATCH] update outline algorithm warning (#1374) fix #794 * update outline algorithm warning * includes reference to alternate algorithm proposals and and prose to note the possibility of significant future changes. --- sections/semantics-sections.include | 55 ++++++++++++++++++----------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/sections/semantics-sections.include b/sections/semantics-sections.include index d87f1ef798..df9649963a 100644 --- a/sections/semantics-sections.include +++ b/sections/semantics-sections.include @@ -1470,18 +1470,30 @@
Creating an outline

- There are currently no known native implementations of the outline algorithm in graphical browsers or - assistive technology user agents, although the algorithm is implemented in other software such - as conformance checkers and browser extensions. Therefore the outline algorithm - cannot be relied upon to convey document structure to users. Authors should use heading rank - (h1-h6) to convey document structure. + There are currently no known native implementations of the outline algorithm in graphical + browsers or assistive technology user agents, although the algorithm is implemented in other + software such as conformance checkers and browser extensions. Additionally, there is an + W3C HTML issue #1005 and + W3C HTML issue #830). + Any implementation and usage of these different proposals will be tracked, and may result + in significant future changes to the outline algorithm. + + Therefore, the outline algorithm cannot be relied upon to convey document structure + to users. Authors should use heading rank (h1-h6) to + convey document structure.

-

This section is non-normative

- This section defines an algorithm for creating an outline for a sectioning content - element or a sectioning root element. It is defined in terms of a walk over the nodes - of a DOM tree, in tree order, with each node being visited when it is entered and - when it is exited during the walk. Each time a node is visited, it can be seen as - triggering an enter or exit event. + +

+ This section is non-normative +

+ + This section defines an algorithm for creating an outline for a sectioning content + element or a sectioning root element. It is defined in terms of a walk over the nodes + of a DOM tree, in tree order, with each node being visited when it is entered and + when it is exited during the walk. Each time a node is visited, it can be seen as + triggering an enter or exit event.
The following pseudocode fragment: @@ -1497,19 +1509,20 @@ ...exemplifies how to recursively traverse the node tree and when to trigger the enter - and exit events. See the JavaScript example - for a possible, non-recursive JavaScript implementation. + and exit events. + See the JavaScript example for a possible, + non-recursive JavaScript implementation.
- The outline for a sectioning content element or a sectioning root element - consists of a list of one or more potentially nested sections. The element for which an - outline is created is said to be the outline's owner. + The outline for a sectioning content element or a sectioning root + element consists of a list of one or more potentially nested sections. The element for + which an outline is created is said to be the outline's owner. A section is a container that corresponds to some nodes in the original DOM tree. Each section can have one heading associated with it, and can contain any number of further nested - subsections. The algorithm for the outline also associates each node in the DOM - tree with a particular section and potentially a heading. (The sections in the outline - aren't section elements, though some may correspond to such elements — they are + subsections. The algorithm for the outline also associates each node in the DOM tree with a + particular section and potentially a heading. (The sections in the outline aren't + section elements, though some may correspond to such elements — they are merely conceptual sections.)
@@ -1529,8 +1542,8 @@ ...results in the following outline being created for the body node (and thus the entire document): - 1. Section created for body node. Associated with heading "A". Also associated with - paragraph "B". Nested sections: + 1. Section created for body node. Associated with heading "A". Also associated + with paragraph "B". Nested sections: 1. Section implied for first h2 element. Associated with heading "C". Also associated with paragraph "D". No nested sections. 2. Section implied for second h2 element. Associated with heading "E". Also