E-mail List Archives
Thread: H1 header in iframe
Number of posts in this thread: 6 (In chronological order)
From: adam solomon
Date: Wed, Aug 25 2010 1:57AM
Subject: H1 header in iframe
No previous message | Next message →
Should an HTML page contained in an iframe always start with an h1? Specifically, I have a widget which is only used in an iframe. Would it be preferable to start the widget-page with an h2 being that the iframe is in another page which already has an h1?
Thank you in advance for any helpful responses.
From: Jared Smith
Date: Wed, Aug 25 2010 8:24AM
Subject: Re: H1 header in iframe
← Previous message | Next message →
On Wed, Aug 25, 2010 at 1:55 AM, adam solomon wrote:
>
> Should an HTML page contained in an iframe always start with an h1?
Because the iframe is accessed as if it were content of the parent
page, the headings within the iframe should be structured
appropriately. If the iframe contains the main first level heading for
the entire document, then make it an <h1>. Otherwise lower level
headings (or no headings at all) may be appropriate.
Jared Smith
From: John Foliot
Date: Wed, Aug 25 2010 8:33AM
Subject: Re: H1 header in iframe
← Previous message | Next message →
Jared Smith wrote:
> >
> > Should an HTML page contained in an iframe always start with an h1?
>
> Because the iframe is accessed as if it were content of the parent
> page, the headings within the iframe should be structured
> appropriately. If the iframe contains the main first level heading for
> the entire document, then make it an <h1>. Otherwise lower level
> headings (or no headings at all) may be appropriate.
As an additional point to Jared's, HTML5's <hgroup> element will be of
significant importance here (I believe) as the browser will be
're-interpreting' headings based on the total document's hierarchal
structure (see: http://html5doctor.com/the-hgroup-element/ for a good
over-view)
In effect, mark up each document as appropriate if it were a stand-alone
document (so yes, include at least 1 <h1>) but when a 'container' document
imports such secondary documents (inside the <hgroup> element) the browser
"knows" that even though the imported document starts with an <h1>,
because it is inside a document that already has an <h1> that this second
instance, in this context, is actually a sub-heading (ergo <h2>) of the
parent document, and adjusts its hierarchal semantic to reflect this.
(Yes, it's kind of mind-bending at first, but actually quite intelligent
and useful. - Read the article, it does a much better job than I of
explaining it)
JF
From: Jason Kiss
Date: Wed, Aug 25 2010 3:06PM
Subject: Re: H1 header in iframe
← Previous message | Next message →
On 26/08/10 02:32, John Foliot wrote:
> As an additional point to Jared's, HTML5's<hgroup> element will be of
> significant importance here (I believe) as the browser will be
> 're-interpreting' headings based on the total document's hierarchal
> structure (see: http://html5doctor.com/the-hgroup-element/ for a good
> over-view)
>
> In effect, mark up each document as appropriate if it were a stand-alone
> document (so yes, include at least 1<h1>) but when a 'container' document
> imports such secondary documents (inside the<hgroup> element) the browser
> "knows" that even though the imported document starts with an<h1>,
> because it is inside a document that already has an<h1> that this second
> instance, in this context, is actually a sub-heading (ergo<h2>) of the
> parent document, and adjusts its hierarchal semantic to reflect this.
> (Yes, it's kind of mind-bending at first, but actually quite intelligent
> and useful. - Read the article, it does a much better job than I of
> explaining it)
>
John, are you referring to HTML5's outlining algorithm and sectioning
content? I thought that the <hgroup> element can only contain headings
(H1-H6) and is primarily for title and subtitle or tag line groupings.
On the other hand, your account of marking up headings in container and
secondary documents sounds like the way that HTML5 deals with sectioning
content and headings and implied sections and subsections when coming up
with the document outline.
From what I can figure out, and similar to what you describe, if the
stand-alone secondary document begins with an H1, and is imported into a
<section> element within the container document (and an <iframe> could
be loaded within a <section> element, I believe), the hierarchical
semantic of the H1 in the secondary document will be adjusted to fit in
with the document outline and heading structure of the surrounding
container document. In fact, no matter what level heading the secondary
document starts with, if loaded within another HTML5 sectioning element,
its position in the document outline will be accounted for based on the
position and nesting of its section.
Of course, that this works will depend on users having HTML5 supporting
technology, so, as you indicated, Jared's suggestion to mark up the
<iframe> document with headings that will fit in properly with the
heading structure of the container document is still the way to go
(though this could be probably be combined with an approach using HTML5
sectioning elements).
The info and examples at
http://www.w3.org/TR/html5/sections.html#headings-and-sections are
actually pretty helpful, I found, especially considering it's a spec.
Jason Kiss
From: adam solomon
Date: Thu, Aug 26 2010 12:33AM
Subject: Re: H1 header in iframe
← Previous message | Next message →
Putting HTML5 aside for the moment, It seems that configuring the header hierarchy in a secondary document will create a double standard. Most of the time, iframe content will not be able to be controlled - it is simply imported. Therefore it would seem that one standard is more appropriate, namely always treating the secondary document as a stand-alone even when we can configure the html.
> Date: Thu, 26 Aug 2010 09:04:09 +1200
> From: = EMAIL ADDRESS REMOVED =
> To: = EMAIL ADDRESS REMOVED =
> Subject: Re: [WebAIM] H1 header in iframe
>
> On 26/08/10 02:32, John Foliot wrote:
> > As an additional point to Jared's, HTML5's<hgroup> element will be of
> > significant importance here (I believe) as the browser will be
> > 're-interpreting' headings based on the total document's hierarchal
> > structure (see: http://html5doctor.com/the-hgroup-element/ for a good
> > over-view)
> >
> > In effect, mark up each document as appropriate if it were a stand-alone
> > document (so yes, include at least 1<h1>) but when a 'container' document
> > imports such secondary documents (inside the<hgroup> element) the browser
> > "knows" that even though the imported document starts with an<h1>,
> > because it is inside a document that already has an<h1> that this second
> > instance, in this context, is actually a sub-heading (ergo<h2>) of the
> > parent document, and adjusts its hierarchal semantic to reflect this.
> > (Yes, it's kind of mind-bending at first, but actually quite intelligent
> > and useful. - Read the article, it does a much better job than I of
> > explaining it)
> >
>
> John, are you referring to HTML5's outlining algorithm and sectioning
> content? I thought that the <hgroup> element can only contain headings
> (H1-H6) and is primarily for title and subtitle or tag line groupings.
>
> On the other hand, your account of marking up headings in container and
> secondary documents sounds like the way that HTML5 deals with sectioning
> content and headings and implied sections and subsections when coming up
> with the document outline.
>
> From what I can figure out, and similar to what you describe, if the
> stand-alone secondary document begins with an H1, and is imported into a
> <section> element within the container document (and an <iframe> could
> be loaded within a <section> element, I believe), the hierarchical
> semantic of the H1 in the secondary document will be adjusted to fit in
> with the document outline and heading structure of the surrounding
> container document. In fact, no matter what level heading the secondary
> document starts with, if loaded within another HTML5 sectioning element,
> its position in the document outline will be accounted for based on the
> position and nesting of its section.
>
> Of course, that this works will depend on users having HTML5 supporting
> technology, so, as you indicated, Jared's suggestion to mark up the
> <iframe> document with headings that will fit in properly with the
> heading structure of the container document is still the way to go
> (though this could be probably be combined with an approach using HTML5
> sectioning elements).
>
> The info and examples at
> http://www.w3.org/TR/html5/sections.html#headings-and-sections are
> actually pretty helpful, I found, especially considering it's a spec.
>
> Jason Kiss
>
From: Jeevan Reddy
Date: Thu, Aug 26 2010 1:15AM
Subject: Re: H1 header in iframe
← Previous message | No next message
Hello!
The purpose of <H1> is to convey Main content of the page. so if
that iframe content conveys main content of the page and has <H1>, then you
shouldn't give <H2> and lower order headings for the content before the
iframe, you may use <H1>.
If you feel that the content before the iframe conveys important content of
the page and the iframe content is in your control, then use <H1> and
Restructure the iframe so that the heading are nested properly.if the iframe
content is out of your control, then even you can use <H1> before the
iframe, there is nothing wrong. Even you can find this kind of scenario in
Gmail standard view.
Overl all you should ensure that the headings are nesting properly.
Best Regards,
Jeevan.
On Wed, Aug 25, 2010 at 7:53 PM, Jared Smith < = EMAIL ADDRESS REMOVED = > wrote:
> On Wed, Aug 25, 2010 at 1:55 AM, adam solomon wrote:
> >
> > Should an HTML page contained in an iframe always start with an h1?
>
> Because the iframe is accessed as if it were content of the parent
> page, the headings within the iframe should be structured
> appropriately. If the iframe contains the main first level heading for
> the entire document, then make it an <h1>. Otherwise lower level
> headings (or no headings at all) may be appropriate.
>
> Jared Smith
>