Re: Validity constraints on <section>

Hi Willem,

I don't understand that change. On one of my websites the thematic grouping
> of content are a bunch of logo's (images).
> It is obvious for everybody that it are logo's, so I don't want to have a
> heading for this introducing the logo's.
> Or should I still add the heading and use display: none with CSS?
>

the change does not require a heading for every section. that would be
MUST, what it says is SHOULD, but there may be cases , such as you describe
where a heading does not make sense. The change is designed to encourage
authors to think about whether it is appropriate to use an unlabelled
section (as it has stated in the spec for some time that sections are for
content that would be listed in the document outline) take this example (
http://www.awardwinnersonly.com) which contains 393 section elements
(sourced from from a comment in this post
http://blog.paciellogroup.com/2013/10/using-html5-section-element/ ) This
is an example ,of many, where the section element is being used contrary to
the spec.
--

Regards

SteveF
HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>


On 16 October 2013 18:39, Willem-Siebe Spoelstra <info@spoelstra.ws> wrote:

> Hi Steve,
>
>
>
> Vriendelijke groet,
>
> Willem-Siebe Spoelstra
>
> Sellebrating
> Ganeshastraat 67
> 1363XA Almere
> Tel: + 31 6 459 575 83
> E-mail: info@spoelstra.ws
> KvK-nummer: 55419038
>
>
>
> 2013/10/14 Steve Faulkner <faulkner.steve@gmail.com>
>
>> I have made a change to the definition of section:
>>
>> added to definition:
>>
>> "Each section should include a heading (h1-h6 element) which briefly
>> describes the content of the section."
>>
>>
>> http://www.w3.org/html/wg/drafts/html/master/sections.html#the-section-element
>>
>>
>> https://github.com/w3c/html/commit/423ee2376ce2e0ab6ee7d9c9631cf07c77da57de
>>
>> bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=23490
>>
>> review and feedback at your leisure.
>>
>>
>> --
>>
>> Regards
>>
>> SteveF
>> HTML 5.1 <http://www.w3.org/html/wg/drafts/html/master/>
>>
>>
>> On 22 March 2013 04:35, Leif Halvard Silli <
>> xn--mlform-iua@xn--mlform-iua.no> wrote:
>>
>>> Silvia Pfeiffer, Fri, 22 Mar 2013 07:36:17 +1100:
>>> > On 22 Mar 2013 01:40, "Robin Berjon" wrote:
>>> >> On 21/03/2013 15:15 , Léonie Watson wrote:
>>>
>>> >>> (screen readers use the region role mapping to report section
>>> >>> elements). That's 216 announcements on a single page.
>>>
>>> >> Yes, that's exactly the problem I was thinking of.
>>> >>
>>> >> So far the only negative feedback we've received is that in
>>> >> books or papers
>>>
>>> > I've seen slide templates use <section> for every slide.
>>>
>>> In Silvia’s slides use case, the headingless section elements are *not*
>>> (right, Silvia?) children of any parent section element. (But perhaps
>>> they would be the children of an <article> element, which should be OK
>>> - or even promoted.) It should be simple to exempt section elements
>>> that are not themselves children of other section elements from the
>>> heading content constraint.
>>>
>>> However, the Lockerz.com web site also contains things like this:
>>>    <section>
>>>       <section> … </section>
>>>       <h1> … </h1>
>>>       …
>>>    </section>
>>> And thus, to simply say that a section must contain a h1-h6 element,
>>> would in fact 'bless' the above construct. Therefore Jirka had a point
>>> when he suggested that the first child should be a heading. However, it
>>> seems enough to demand that the heading content occurs *in front* of
>>> the section children.
>>>
>>> Based on the above, I would like to propose the constraints:
>>>
>>>   A) Section elements are constrained from having any section
>>>      children unless the section *itself* contains heading content
>>>      *in front of* the first child section element.
>>>   B) When a section element contains section children, then not only
>>>      the section element itself, but also all the section children
>>>      must contain heading content.
>>>   C) Section elements are not allowed to be empty. (Lockerz.com has
>>>      two empty section elements.
>>>
>>> I’m not 100% sure that the the B) constraint is necessary - may be A)
>>> is enough.
>>> --
>>> leif halvard silli
>>
>>
>>
>

Received on Thursday, 17 October 2013 10:41:53 UTC