This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23490 - strengthen advice on when to use a section
Summary: strengthen advice on when to use a section
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: steve faulkner
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-14 15:13 UTC by steve faulkner
Modified: 2014-01-16 15:12 UTC (History)
8 users (show)

See Also:


Attachments

Description steve faulkner 2013-10-14 15:13:18 UTC
"4.4.3 The section element"
http://www.w3.org/html/wg/drafts/html/master/sections.html#the-section-element
Comment 1 github bugzilla bot 2013-10-14 16:03:33 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/423ee2376ce2e0ab6ee7d9c9631cf07c77da57de
authors should provide a <hx> for a section

fixes bug 23490
Comment 2 steve faulkner 2013-10-14 16:10:40 UTC
refer to discussion Validity constraints on <section>: http://lists.w3.org/Archives/Public/public-html/2013Mar/0129.html

EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see commit
Rationale: Authors are using section as a generic container, trying to reduce this by defining that they SHOULD provide a heading for each section.
Comment 3 Jukka K. Korpela 2013-10-14 18:54:01 UTC
This is a wrong fix to a non-problem. It has no practical impact except that it may confuse authors. One of the few reasons to use section elements is that they provide a way to divide a document into thematic parts even when some or no parts has a heading. Moreover, the characterization “briefly describes the content of the section” reflects a very one-sided view on the roles of a heading.

For example, a novel can be divided into section elements, and they can have headings, often just numbering headings like “Chapter 1”. There is no reason to tell people not to use such headings, especially if they are just converting an existing work into HTML format. And a chapter of a novel could meaningfully be divided into sections without headings – parts that describe different courses of events, visually separated e.g. by a blank line.

Note that the descriptions of h1–h6 do not say that headings describe the content of sections. They are just, well, headings. This is OK. There are many kinds of headings, and their nature is a matter of presentation style and depends on the genre – it’s not adequate to restrict headings to brief descriptions of content.
Comment 4 steve faulkner 2013-10-14 19:04:11 UTC
(In reply to Jukka K. Korpela from comment #3)
> This is a wrong fix to a non-problem. It has no practical impact except that
> it may confuse authors. One of the few reasons to use section elements is
> that they provide a way to divide a document into thematic parts even when
> some or no parts has a heading. Moreover, the characterization “briefly
> describes the content of the section” reflects a very one-sided view on the
> roles of a heading.
> 
> For example, a novel can be divided into section elements, and they can have
> headings, often just numbering headings like “Chapter 1”. There is no reason
> to tell people not to use such headings, especially if they are just
> converting an existing work into HTML format. And a chapter of a novel could
> meaningfully be divided into sections without headings – parts that describe
> different courses of events, visually separated e.g. by a blank line.
> 
> Note that the descriptions of h1–h6 do not say that headings describe the
> content of sections. They are just, well, headings. This is OK. There are
> many kinds of headings, and their nature is a matter of presentation style
> and depends on the genre – it’s not adequate to restrict headings to brief
> descriptions of content.

HI jukka, while i understand your feedback in regards to prescribing what headings are i don't understand 
"> This is a wrong fix to a non-problem. " 

why is it a non problem? And why is it wrong to make a soft requirement for the author to provide a heading?
Comment 5 Jukka K. Korpela 2013-10-14 19:29:09 UTC
(In reply to steve faulkner from comment #4)

> why is it a non problem?

Because a section element without a heading is not a problem. It is often quite adequate, as I described. 

> And why is it wrong to make a soft requirement for
> the author to provide a heading?

To people accustomed to reading RFCs, as many readers of the spec are, “should” is a serious word – and the spec defines “should” to mean what RFC 2119 says.

I don’t think HTML5 should give advice on the composition of works in general. That would be way out of scope (and would often result in wrong advice).

If you want to say something about headings, then this could be suitable:

The content of a section element often starts with a heading or otherwise contains a heading for the section. A section may also appear without a heading
Comment 6 steve faulkner 2013-10-14 19:58:42 UTC
(In reply to Jukka K. Korpela from comment #5)
> (In reply to steve faulkner from comment #4)
> 
> > why is it a non problem?
> 
> Because a section element without a heading is not a problem. It is often
> quite adequate, as I described. 

you didm't actually describe it.

> 
> > And why is it wrong to make a soft requirement for
> > the author to provide a heading?
> 
> To people accustomed to reading RFCs, as many readers of the spec are,

I would suggest the opposite

> “should” is a serious word – and the spec defines “should” to mean what RFC
> 2119 says.

and that is why it was used.

3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there
   may exist valid reasons in particular circumstances to ignore a
   particular item, but the full implications must be understood and
   carefully weighed before choosing a different course.

http://www.ietf.org/rfc/rfc2119.txt

is reasonable as the provision of a heading is recommended in most circumstances. The lack of clarity around the use of section has already resulted in widespread misuse which has had a negative effect on users.
Comment 7 Jukka K. Korpela 2013-10-14 20:16:42 UTC
(In reply to steve faulkner from comment #6)

> > Because a section element without a heading is not a problem. It is often
> > quite adequate, as I described. 
> 
> you didm't actually describe it.

I gave a an example of a novel section divided into subsections.

> > “should” is a serious word – and the spec defines “should” to mean what RFC
> > 2119 says.
> 
> and that is why it was used.

Taken in the RFC 2119 sense, as it should, it is in not “soft”. As you quote:

>    the full implications must be understood and
>    carefully weighed before choosing a different course.

How is an author even assumed to weight the implications when no rationale for the requirement is given?

> is reasonable as the provision of a heading is recommended in most
> circumstances.

Recommended by whom, and why? It is evident that a heading is useful in many cases. So evident that it hardly makes sense to say it in normative prose (even as a “should” requirement) in a specification. In other cases, the requirement would be confusing at best, and could even make people write dummy heading content if they take the requirement seriously.

> The lack of clarity around the use of section has already
> resulted in widespread misuse which has had a negative effect on users.

Which widespread misuse with which negative effect on users?

The section element has no impact on users, really. And if some content should have a heading, then it should have a heading quite independently of use of a section element – so the context would be wrong for advocacy of headings even if we thought that such advocacy belongs to HTML5.
Comment 8 steve faulkner 2013-10-14 21:31:43 UTC
(In reply to Jukka K. Korpela from comment #7)
> (In reply to steve faulkner from comment #6)
> 
> > > Because a section element without a heading is not a problem. It is often
> > > quite adequate, as I described. 
> > 
> > you didm't actually describe it.
> 
> I gave a an example of a novel section divided into subsections.
> 
> > > “should” is a serious word – and the spec defines “should” to mean what RFC
> > > 2119 says.
> > 
> > and that is why it was used.
> 
> Taken in the RFC 2119 sense, as it should, it is in not “soft”. As you quote:

it is soft compared to MUST
> 
> >    the full implications must be understood and
> >    carefully weighed before choosing a different course.
> 
> How is an author even assumed to weight the implications when no rationale
> for the requirement is given?

that is an argument for better explanation in the spec - noted


> 
> > is reasonable as the provision of a heading is recommended in most
> > circumstances.
> 
> Recommended by whom, and why? It is evident that a heading is useful in many
> cases. So evident that it hardly makes sense to say it in normative prose
> (even as a “should” requirement) in a specification. In other cases, the
> requirement would be confusing at best, and could even make people write
> dummy heading content if they take the requirement seriously.

recommended in the spec and no it would mean that authors don't use the section element as a replacement for a div which they currently are doing.

> 
> > The lack of clarity around the use of section has already
> > resulted in widespread misuse which has had a negative effect on users.
> 
> Which widespread misuse with which negative effect on users?
> 
> The section element has no impact on users, really. And if some content
> should have a heading, then it should have a heading quite independently of
> use of a section element – so the context would be wrong for advocacy of
> headings even if we thought that such advocacy belongs to HTML5.

The section element maps to a region role in accessibility APIs (as required in HTML5), region roles are exposed to users. and its misuse does have a negative effect as reported by users. sections also have an effect upon the document outline and their misuse could have a negative effect upon users if any user agent implements the outline algorithm.
Comment 9 Romain Deltour 2013-10-14 21:42:28 UTC
Although I appreciate that a "should" may have a positive impact on sectionarrhea, I confirm Jukka's stand that heading-less sections are heavily used in digital publishing (e.g. EPUB) – as I already commented last March on twitter [1], reported by Robin [2].

Would it make sense to reduce the confusion by explicitly mentioning legitimate use cases for heading-less sections, either via prose or examples ?

Additionally, is it still a no-go to recommend aria-label as an alternative to headings in sections ?

[1] https://twitter.com/rdeltour/status/314739301676113920
[2] http://lists.w3.org/Archives/Public/public-html/2013Mar/0143.html
Comment 10 steve faulkner 2013-10-14 21:51:48 UTC
(In reply to Romain Deltour from comment #9)

hi Romain,

> Would it make sense to reduce the confusion by explicitly mentioning
> legitimate use cases for heading-less sections, either via prose or examples
> ?

yes that is a possibility


> Additionally, is it still a no-go to recommend aria-label as an alternative
> to headings in sections ?

it isn't a no go

note the change I made in the spec is a starting place not an end, its only an editors draft after all.
Comment 11 Romain Deltour 2013-10-14 22:00:14 UTC
> it isn't a no go

Ok, I thought it was based on that comment [1], but fine then!

[1] http://lists.w3.org/Archives/Public/public-html/2013Mar/0144.html
Comment 12 steve faulkner 2013-10-15 07:29:33 UTC
re-opening to reflect ongoing discussion
Comment 13 steve faulkner 2013-10-15 08:51:16 UTC
(In reply to Romain Deltour from comment #9)
> Although I appreciate that a "should" may have a positive impact on
> sectionarrhea, I confirm Jukka's stand that heading-less sections are
> heavily used in digital publishing (e.g. EPUB) – as I already commented last
> March on twitter [1], reported by Robin [2].
> 
> Would it make sense to reduce the confusion by explicitly mentioning
> legitimate use cases for heading-less sections, either via prose or examples
> ?
> 
> Additionally, is it still a no-go to recommend aria-label as an alternative
> to headings in sections ?
> 
> [1] https://twitter.com/rdeltour/status/314739301676113920
> [2] http://lists.w3.org/Archives/Public/public-html/2013Mar/0143.html

Hi Romain, could you point to some examples of epub docs that make use of section? and related advice in epub on its use? It would be useful to get a better understanding of how it is used.
Comment 14 steve faulkner 2013-10-15 09:16:20 UTC
(In reply to Romain Deltour from comment #9)
> Although I appreciate that a "should" may have a positive impact on
> sectionarrhea, I confirm Jukka's stand that heading-less sections are
> heavily used in digital publishing (e.g. EPUB) – as I already commented last
> March on twitter [1], reported by Robin [2].
> 
> Would it make sense to reduce the confusion by explicitly mentioning
> legitimate use cases for heading-less sections, either via prose or examples
> ?
> 
> Additionally, is it still a no-go to recommend aria-label as an alternative
> to headings in sections ?
> 
> [1] https://twitter.com/rdeltour/status/314739301676113920
> [2] http://lists.w3.org/Archives/Public/public-html/2013Mar/0143.html


the ePub accessibility guide contains good advice on section http://www.idpf.org/accessibility/guidelines/content/about.php, lets look at how we can incorporate a reference to it to clarify requirements around use of hx
Comment 15 github bugzilla bot 2013-10-15 11:15:38 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/91960c6f0eeb4386cb0a1c4b83c7feda16b6783e
tweaked section definition

see discussion on bug 23490
Comment 16 steve faulkner 2013-10-15 11:19:01 UTC
(In reply to github bugzilla bot from comment #15)
> Commit pushed to master at https://github.com/w3c/html
> 
> https://github.com/w3c/html/commit/91960c6f0eeb4386cb0a1c4b83c7feda16b6783e
> tweaked section definition
> 
> see discussion on bug 23490

I have tweaked it so the SHOULD refers to the identification of the theme of the section rather than should be a heading, this brings it into line with the ePub accessibility recommendations on sections http://www.idpf.org/accessibility/guidelines/content/xhtml/sections.php
Comment 17 steve faulkner 2013-10-15 11:24:04 UTC
(In reply to Jukka K. Korpela from comment #3)
> This is a wrong fix to a non-problem. It has no practical impact except that
> it may confuse authors. One of the few reasons to use section elements is
> that they provide a way to divide a document into thematic parts even when
> some or no parts has a heading. Moreover, the characterization “briefly
> describes the content of the section” reflects a very one-sided view on the
> roles of a heading.
> 
> For example, a novel can be divided into section elements, and they can have
> headings, often just numbering headings like “Chapter 1”. There is no reason
> to tell people not to use such headings, especially if they are just
> converting an existing work into HTML format. And a chapter of a novel could
> meaningfully be divided into sections without headings – parts that describe
> different courses of events, visually separated e.g. by a blank line.
> 
> Note that the descriptions of h1–h6 do not say that headings describe the
> content of sections. They are just, well, headings. This is OK. There are
> many kinds of headings, and their nature is a matter of presentation style
> and depends on the genre – it’s not adequate to restrict headings to brief
> descriptions of content.

Jukka, I have removed the offending words and have reworked the definition
Comment 18 github bugzilla bot 2013-10-15 11:36:45 UTC
Commit pushed to master at https://github.com/w3c/html

https://github.com/w3c/html/commit/55c67c05f21eed81d985f7a26e9ea3b46fe915a5
changed child to descendant

see bug 23490
Comment 19 Romain Deltour 2013-10-15 13:07:48 UTC
Probably nitpicking, but if a section has a sub-section with a heading, it complies with the "descendant heading" recommendation but the top-level section is still "unidentified".

Also, I w/b in favor of explicitly mentioning aria-label as an alternative way to identify the "theme" of the section.
Comment 20 steve faulkner 2013-10-15 13:10:37 UTC
(In reply to Romain Deltour from comment #19)
> Probably nitpicking, but if a section has a sub-section with a heading, it
> complies with the "descendant heading" recommendation but the top-level
> section is still "unidentified".
> 
> Also, I w/b in favor of explicitly mentioning aria-label as an alternative
> way to identify the "theme" of the section.

thanks Romain, not nit picking it needs to be further clarified. I will also add a note and example about use of aria-label.
Comment 21 Willem-Siebe Spoelstra 2013-12-03 09:15:49 UTC
(In reply to steve faulkner from comment #20)
> (In reply to Romain Deltour from comment #19)
> > Probably nitpicking, but if a section has a sub-section with a heading, it
> > complies with the "descendant heading" recommendation but the top-level
> > section is still "unidentified".
> > 
> > Also, I w/b in favor of explicitly mentioning aria-label as an alternative
> > way to identify the "theme" of the section.
> 
> thanks Romain, not nit picking it needs to be further clarified. I will also
> add a note and example about use of aria-label.

So, if I understand it correctly, we agree on the fact that not always the use of a heading is appropriate for a section. 

However, we only must use a section when we want it to be a part of the HTML outline, even is the section is unnamed.

In this bug (https://www.w3.org/Bugs/Public/show_bug.cgi?id=23545) I find a discussion about screenreaders that should skip a section if it does not have an accessible name.

So, my conclusion is, that when I use a section with no heading, for example for grouping a bunch of logo's, which I still want to be part of the HTML outline, I can use ARIA-label to provide this section with an accessible name so screenreaders won't skip this.
Comment 22 steve faulkner 2013-12-03 11:07:33 UTC
(In reply to Willem-Siebe Spoelstra from comment #21)

> However, we only must use a section when we want it to be a part of the HTML
> outline, even is the section is unnamed.

correct 
> 
> In this bug (https://www.w3.org/Bugs/Public/show_bug.cgi?id=23545) I find a
> discussion about screenreaders that should skip a section if it does not
> have an accessible name.

correct, I have added advice to the spec on that:

"Note:It is strongly recommended that user agents such as screen readers only convey the presence of, and provide navigation for section elements, when the section element has an accessible name." 
http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-implicit-aria-semantics
> 
> So, my conclusion is, that when I use a section with no heading, for example
> for grouping a bunch of logo's, which I still want to be part of the HTML
> outline, I can use ARIA-label to provide this section with an accessible
> name so screenreaders won't skip this.

yes, that is the intended outcome.
Comment 23 steve faulkner 2013-12-03 11:26:35 UTC
(In reply to Willem-Siebe Spoelstra from comment #21)
note the current behaviour of announcing a region is onl present in one screen reader (JAWS - the most popular one) also note that the outline algorithm is not supported by any browser or AT, also see http://blog.paciellogroup.com/2013/10/html5-document-outline/ in regards to outline algorithm support.