Using <h2> as subtitle in W3C specifications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Using <h2> as subtitle in W3C specifications

Robin Berjon-6
Hi all,

it is the current practice in W3C specifications to use an <h2> element
for a specification's subtitle (either the actual subtitle, or the "W3C
$SPEC_STATUS $DATE" part.

It so happens that this is a practice which is frowned upon by the HTML
specification:

     "h1–h6 elements must not be used to markup subheadings, subtitles,
      alternative titles and taglines unless intended to be the heading
      for a new section or subsection."
     -- http://www.w3.org/TR/html5/common-idioms.html#sub-head

The suggested fix would be to transition to using a <p> element with a
specific class. This is what HTML5 used to do (because it had special
dispensation to break stuff) but that won't be possible with the new
automatic publishing system. Also, it's nicer to follow our own
suggestions in general.

If this is agreed upon, we'll have a transition period so that everyone
has time to make this small change.

--
Robin Berjon - http://berjon.com/ - @robinberjon

Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Shane McCarron
+1

On Thu, Mar 12, 2015 at 8:56 AM, Robin Berjon <[hidden email]> wrote:
Hi all,

it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.

It so happens that this is a practice which is frowned upon by the HTML specification:

    "h1–h6 elements must not be used to markup subheadings, subtitles,
     alternative titles and taglines unless intended to be the heading
     for a new section or subsection."
    -- http://www.w3.org/TR/html5/common-idioms.html#sub-head

The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.

If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.

--
Robin Berjon - http://berjon.com/ - @robinberjon




--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.
Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Steve Faulkner-2
In reply to this post by Robin Berjon-6
+1

--

Regards

SteveF
HTML 5.1

On 12 March 2015 at 13:56, Robin Berjon <[hidden email]> wrote:
Hi all,

it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.

It so happens that this is a practice which is frowned upon by the HTML specification:

    "h1–h6 elements must not be used to markup subheadings, subtitles,
     alternative titles and taglines unless intended to be the heading
     for a new section or subsection."
    -- http://www.w3.org/TR/html5/common-idioms.html#sub-head

The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.

If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.

--
Robin Berjon - http://berjon.com/ - @robinberjon


Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Matthew King
In reply to this post by Robin Berjon-6
agree.


Matt King
IBM Senior Technical Staff Member
I/T Chief Accessibility Strategist
IBM BT/CIO - Global Workforce and Web Process Enablement
Phone: (503) 578-2329, Tie line: 731-7398
[hidden email]




From:        Robin Berjon <[hidden email]>
To:        "[hidden email]" <[hidden email]>,
Cc:        Steve Faulkner <[hidden email]>
Date:        03/12/2015 06:58 AM
Subject:        Using <h2> as subtitle in W3C specifications




Hi all,

it is the current practice in W3C specifications to use an <h2> element
for a specification's subtitle (either the actual subtitle, or the "W3C
$SPEC_STATUS $DATE" part.

It so happens that this is a practice which is frowned upon by the HTML
specification:

    "h1–h6 elements must not be used to markup subheadings, subtitles,
     alternative titles and taglines unless intended to be the heading
     for a new section or subsection."
    --
http://www.w3.org/TR/html5/common-idioms.html#sub-head

The suggested fix would be to transition to using a <p> element with a
specific class. This is what HTML5 used to do (because it had special
dispensation to break stuff) but that won't be possible with the new
automatic publishing system. Also, it's nicer to follow our own
suggestions in general.

If this is agreed upon, we'll have a transition period so that everyone
has time to make this small change.

--
Robin Berjon -
http://berjon.com/- @robinberjon



Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

James Craig-4
In reply to this post by Robin Berjon-6
Would it be better to keep the subheading in the same <h#> element, and indicate the sub-level status semantically. A <p> outside the heading does not do that. Some suggestions.

1. <small> inside heading.
   <h1>Heading <small>Sub-heading</small></h1>

2. Even <div> inside heading, possibly with a role. (less semantic than h1>small, but still better than h1+p)
   <h1>Heading <div>Sub-heading</div></h1>

Should we consider adding an ARIA role for "subheading"?

James


> On Mar 12, 2015, at 6:56 AM, Robin Berjon <[hidden email]> wrote:
>
> Hi all,
>
> it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.
>
> It so happens that this is a practice which is frowned upon by the HTML specification:
>
>    "h1–h6 elements must not be used to markup subheadings, subtitles,
>     alternative titles and taglines unless intended to be the heading
>     for a new section or subsection."
>    -- http://www.w3.org/TR/html5/common-idioms.html#sub-head
>
> The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.
>
> If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.
>
> --
> Robin Berjon - http://berjon.com/ - @robinberjon
>


Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Liam R. E. Quin
In reply to this post by Robin Berjon-6
On Thu, 2015-03-12 at 14:56 +0100, Robin Berjon wrote:
> [...] suggested fix would be to transition to using a <p> element
> with
> a specific class.

I'm sad to see the loss of shared semantics for a secondary heading.
This seems contrary to the spirit of HTML 5 to me.

Is there an ARIA role for a sub-heading?

How will a screen reader know it's a heading?
>
>
>


--
Liam R. E. Quin <[hidden email]>
The World Wide Web Consortium (W3C)

Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

James Craig-4
In reply to this post by James Craig-4
Both use the "heading" superclass.

  dpub-subtitle: An explanatory or alternate title for the work.
  dpub-title: The primary name of a work, section or component.

I can see the need for these in publishing context. I'm not convinced it's the same as subheading. Also, by their structure, it seems the publishing industry has adopting the h1+h2 approach, rather than the h1>div or h1+p approach.

Are we certain h1+h2 (sibling heading approach) is undesirable?


> On Mar 12, 2015, at 5:51 PM, [hidden email] wrote:
>
> DPUB has role=subtitle
>
>
>> On Mar 12, 2015, at 5:22 PM, James Craig <[hidden email]> wrote:
>>
>> Would it be better to keep the subheading in the same <h#> element, and indicate the sub-level status semantically. A <p> outside the heading does not do that. Some suggestions.
>>
>> 1. <small> inside heading.
>>  <h1>Heading <small>Sub-heading</small></h1>
>>
>> 2. Even <div> inside heading, possibly with a role. (less semantic than h1>small, but still better than h1+p)
>>  <h1>Heading <div>Sub-heading</div></h1>
>>
>> Should we consider adding an ARIA role for "subheading"?
>>
>> James
>>
>>
>>> On Mar 12, 2015, at 6:56 AM, Robin Berjon <[hidden email]> wrote:
>>>
>>> Hi all,
>>>
>>> it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.
>>>
>>> It so happens that this is a practice which is frowned upon by the HTML specification:
>>>
>>>  "h1–h6 elements must not be used to markup subheadings, subtitles,
>>>   alternative titles and taglines unless intended to be the heading
>>>   for a new section or subsection."
>>>  -- http://www.w3.org/TR/html5/common-idioms.html#sub-head
>>>
>>> The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.
>>>
>>> If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.
>>>
>>> --
>>> Robin Berjon - http://berjon.com/ - @robinberjon
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Matthew King
In reply to this post by James Craig-4
As a screen reader user, Sometimes I feel like there is such a thing as semantic overload.

Think what is lost vs what is gained vs the UX cost of the gain.

Perhaps such extra markup could bring more value than pain... I am not sure.

Matt King
IBM Senior Technical Staff Member
I/T Chief Accessibility Strategist
IBM BT/CIO - Global Workforce and Web Process Enablement
Phone: (503) 578-2329, Tie line: 731-7398
[hidden email]




From:        James Craig <[hidden email]>
To:        Robin Berjon <[hidden email]>,
Cc:        "[hidden email]" <[hidden email]>, Steve Faulkner <[hidden email]>
Date:        03/12/2015 05:24 PM
Subject:        Re: Using <h2> as subtitle in W3C specifications




Would it be better to keep the subheading in the same <h#> element, and indicate the sub-level status semantically. A <p> outside the heading does not do that. Some suggestions.

1. <small> inside heading.
  <h1>Heading <small>Sub-heading</small></h1>

2. Even <div> inside heading, possibly with a role. (less semantic than h1>small, but still better than h1+p)
  <h1>Heading <div>Sub-heading</div></h1>

Should we consider adding an ARIA role for "subheading"?

James


> On Mar 12, 2015, at 6:56 AM, Robin Berjon <[hidden email]> wrote:
>
> Hi all,
>
> it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.
>
> It so happens that this is a practice which is frowned upon by the HTML specification:
>
>    "h1–h6 elements must not be used to markup subheadings, subtitles,
>     alternative titles and taglines unless intended to be the heading
>     for a new section or subsection."
>    --
http://www.w3.org/TR/html5/common-idioms.html#sub-head
>
> The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.
>
> If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.
>
> --
> Robin Berjon -
http://berjon.com/- @robinberjon
>




Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

James Craig-4
In reply to this post by James Craig-4
Works for me.

> On Mar 13, 2015, at 1:16 AM, Steve Faulkner <[hidden email]> wrote:
>
> The pattern advocated in HTML5 is
>
> <header>
>   <h1>HTML 5.1 Nightly</h1>
>   <p>A vocabulary and associated APIs for HTML and XHTML</p>
>   <p>Editor's Draft 9 May 2013</p>
> </header>
>
> The paragraphs along with the heading are grouped/associated by the header element
>
> Steve Faulkner
> TPG Distinguished Accessibility Engineer
> -
> Co-editor HTML 5.1
>
>
>
> -----Original Message-----
> From: James Craig [mailto:[hidden email]]
> Sent: 13 March 2015 00:23
> To: Robin Berjon
> Cc: [hidden email]; Steve Faulkner
> Subject: Re: Using <h2> as subtitle in W3C specifications
>
> Would it be better to keep the subheading in the same <h#> element, and indicate the sub-level status semantically. A <p> outside the heading does not do that. Some suggestions.
>
> 1. <small> inside heading.
>   <h1>Heading <small>Sub-heading</small></h1>
>
> 2. Even <div> inside heading, possibly with a role. (less semantic than h1>small, but still better than h1+p)
>   <h1>Heading <div>Sub-heading</div></h1>
>
> Should we consider adding an ARIA role for "subheading"?
>
> James
>
>
>> On Mar 12, 2015, at 6:56 AM, Robin Berjon <[hidden email]> wrote:
>>
>> Hi all,
>>
>> it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.
>>
>> It so happens that this is a practice which is frowned upon by the HTML specification:
>>
>>   "h1–h6 elements must not be used to markup subheadings, subtitles,
>>    alternative titles and taglines unless intended to be the heading
>>    for a new section or subsection."
>>   -- http://www.w3.org/TR/html5/common-idioms.html#sub-head
>>
>> The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.
>>
>> If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.
>>
>> --
>> Robin Berjon - http://berjon.com/ - @robinberjon
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Matthew King
For the specs, I too think that works.
BTW, header maps to banner so screen readers will pickup that structure in a practical way.
Matt King
IBM Senior Technical Staff Member
I/T Chief Accessibility Strategist
IBM BT/CIO - Global Workforce and Web Process Enablement
Phone: (503) 578-2329, Tie line: 731-7398
[hidden email]




From:        James Craig <[hidden email]>
To:        Steve Faulkner <[hidden email]>,
Cc:        Robin Berjon <[hidden email]>, [hidden email]
Date:        03/13/2015 02:42 AM
Subject:        Re: Using <h2> as subtitle in W3C specifications




Works for me.

> On Mar 13, 2015, at 1:16 AM, Steve Faulkner <[hidden email]> wrote:
>
> The pattern advocated in HTML5 is
>
> <header>
>   <h1>HTML 5.1 Nightly</h1>
>   <p>A vocabulary and associated APIs for HTML and XHTML</p>
>   <p>Editor's Draft 9 May 2013</p>
> </header>
>
> The paragraphs along with the heading are grouped/associated by the header element
>
> Steve Faulkner
> TPG Distinguished Accessibility Engineer
> -
> Co-editor HTML 5.1
>
>
>
> -----Original Message-----
> From: James Craig [
mailto:jcraig@...]
> Sent: 13 March 2015 00:23
> To: Robin Berjon
> Cc: [hidden email]; Steve Faulkner
> Subject: Re: Using <h2> as subtitle in W3C specifications
>
> Would it be better to keep the subheading in the same <h#> element, and indicate the sub-level status semantically. A <p> outside the heading does not do that. Some suggestions.
>
> 1. <small> inside heading.
>   <h1>Heading <small>Sub-heading</small></h1>
>
> 2. Even <div> inside heading, possibly with a role. (less semantic than h1>small, but still better than h1+p)
>   <h1>Heading <div>Sub-heading</div></h1>
>
> Should we consider adding an ARIA role for "subheading"?
>
> James
>
>
>> On Mar 12, 2015, at 6:56 AM, Robin Berjon <[hidden email]> wrote:
>>
>> Hi all,
>>
>> it is the current practice in W3C specifications to use an <h2> element for a specification's subtitle (either the actual subtitle, or the "W3C $SPEC_STATUS $DATE" part.
>>
>> It so happens that this is a practice which is frowned upon by the HTML specification:
>>
>>   "h1–h6 elements must not be used to markup subheadings, subtitles,
>>    alternative titles and taglines unless intended to be the heading
>>    for a new section or subsection."
>>   --
http://www.w3.org/TR/html5/common-idioms.html#sub-head
>>
>> The suggested fix would be to transition to using a <p> element with a specific class. This is what HTML5 used to do (because it had special dispensation to break stuff) but that won't be possible with the new automatic publishing system. Also, it's nicer to follow our own suggestions in general.
>>
>> If this is agreed upon, we'll have a transition period so that everyone has time to make this small change.
>>
>> --
>> Robin Berjon -
http://berjon.com/- @robinberjon
>>
>




Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Steve Faulkner-2

On 13 March 2015 at 19:39, Matthew King <[hidden email]> wrote:
For the specs, I too think that works.
BTW, header maps to banner so screen readers will pickup that structure in a practical way.

that is why the advice in html5 is framed as it is:
to make use of <header> semantics
--

Regards

SteveF
HTML 5.1
Reply | Threaded
Open this post in threaded view
|

Re: Using <h2> as subtitle in W3C specifications

Robin Berjon-6
In reply to this post by Liam R. E. Quin
On 13/03/2015 02:00 , Liam R. E. Quin wrote:
> On Thu, 2015-03-12 at 14:56 +0100, Robin Berjon wrote:
>> [...] suggested fix would be to transition to using a <p> element
>> with
>> a specific class.
>
> I'm sad to see the loss of shared semantics for a secondary heading.
> This seems contrary to the spirit of HTML 5 to me.

The problem is semantic overload. Using the same element, you can't tell
the difference between a secondary/sub heading and the start of a new
subsection. In a perfect world we'd have had <section> a very long time
ago and it would have been reliably used. Sadly, that's not what we have.

--
Robin Berjon - http://berjon.com/ - @robinberjon