Comments on: Simplequiz #7: Pinterest https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/ helping you implement HTML5 today Fri, 17 Jun 2016 18:04:56 +0000 hourly 1 By: Ian Y. https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-35312 Sat, 22 Jun 2013 01:27:22 +0000 http://html5doctor.com/?p=4776#comment-35312 @Richard, yes, the spec doesn’t say we should add headings for sectioning elements. However, it can cause issues if not doing so.

Sectioning elements form sections in the document outline. Without headings, they lost their identities and people have no way to tell their purposes in the document outline.

Another concern is accessibility. After screen reader users reach a section, they need a heading to let them know what the purpose of the section is.

For sections which don’t show headings visually, we still should add headings for them in HTML and hide their headings using CSS.

]]>
By: Andrew Himmer https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-35297 Fri, 21 Jun 2013 17:30:00 +0000 http://html5doctor.com/?p=4776#comment-35297 The only issue I have with some of these options is the use of the nav element. I feel that the nav element is reserved for actual navigation. A group of anchor elements that act like tool options does not constitute navigation (they don’t link to related content or pages, or other sections).

]]>
By: Richard Clark https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-35277 Fri, 21 Jun 2013 11:51:42 +0000 http://html5doctor.com/?p=4776#comment-35277 @Ian, although they are sectioning elements, there is no requirement for them to have a heading (at least according to the spec). A nav for example won’t always need a heading, yet it is a sectioning element.

]]>
By: Ian Y. https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-35190 Wed, 19 Jun 2013 10:57:20 +0000 http://html5doctor.com/?p=4776#comment-35190 article, section, and aside are all sectioning elements. Wherever they are presented, there need to be heading elements associated with them. Since there are no headings in Pinterest entries, the above mentioned three elements might not be ideal candidates.

]]>
By: Behrang https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-34092 Wed, 01 May 2013 07:29:58 +0000 http://html5doctor.com/?p=4776#comment-34092 I prefer a markup with article, figure, and aside elements but no navs or sections.

]]>
By: steve faulkner https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-31471 Mon, 11 Feb 2013 12:37:04 +0000 http://html5doctor.com/?p=4776#comment-31471 @paul,

note that figcaption must be either first or last child of the figure element see content model.

]]>
By: steve faulkner https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-31470 Mon, 11 Feb 2013 11:25:32 +0000 http://html5doctor.com/?p=4776#comment-31470 I have updated the HTML 5.1 editor’s draft informative text about figure. Feedback welcome, This blog post On joining the HTML editors team provides details on how you can comment.

]]>
By: Paul https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-31460 Sun, 10 Feb 2013 21:52:13 +0000 http://html5doctor.com/?p=4776#comment-31460 I’m pretty sure I’m beating a dead horse and everyone has moved on. But I didn’t see this solution proposed and I think it works:

Certain elements are said to be sectioning roots, including blockquote and td elements. These elements can have their own outlines, but the sections and headings inside these elements do not contribute to the outlines of their ancestors.
->
blockquote, body, details, dialog, fieldset, figure, td
HTML5 Spec

Since figure is a sectioning root, it can have its own outline. And it allows for flow content like footer and menu with an optional figcaption.

So, what about…


<article class="pin">
  <figure class="pin-holder">
    <a href="me/cat/">
      <img src="cat.jpg" alt="My awesome cat"/>
    </a>
    <figcaption>
<p>Awesome cat description.<p>
</figcaption>
 <footer>
   <ul class="stats">
     <li>25 likes</li>
     <li>2 comments</li>
   <li>100 repins</li>
   </ul>
   <div class="attribution">
     <a href="/me/">
       <img src="me.jpg" alt="Me's Profile">
     </a>
     <p><a href="/me/">Me</a> onto <ahref="/here/">here</a></p>
   </div>
 </footer>
<menu class="actions" type="toolbar">
    <button onclick="repin">Repin</button>
    <button onclick="like">Like</button>
    <buttononclick="comment">Comment</button>
  </menu>
  </figure>
</article>

]]>
By: Paul O'Donnell https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-31432 Sat, 09 Feb 2013 23:02:40 +0000 http://html5doctor.com/?p=4776#comment-31432 A follow-up to my last comment.

Either <figure> is a tag meant for an image or graphic that accompanies and augments an article (as in, “see figure 1”) or it is, as Pete disapprovingly or disappointedly notes, merely a mechanism for captioning an image (with no other semantic overhead).

The former seems more in line with w3’s definition of it as “a unit of content, optionally with a caption, that is self-contained, that is typically referenced as a single unit from the main flow of the document, and that can be moved away from the main flow of the document without affecting the document’s meaning.”

This seems inconsistent with its being -the- main content in an article. Our example is a good illustration of why. First, ‘Moving it away’ leaves a footer that foots nothing. Second, it is not referenced from the main flow of the document.

So I guess I am taking issue with <figure> being used as the main content. It is not that it’s superfluous, but self-neutering. Neutersome, to coin a term.

]]>
By: Paul O'Donnell https://stevefaulkner.github.io/html5doctored/html5-simplequiz-7-pinterest/#comment-31427 Sat, 09 Feb 2013 21:24:19 +0000 http://html5doctor.com/?p=4776#comment-31427 @Dr. Richard Clark. While the final markup seems to be the best thing going, I keep going back to Luke Padgett’s point about <figure> and <figurecaption>. I gather it is confirmed for use as main content. But this doesn’t mean we should. Furthermore, using it in this way seems to me to set limitations on what you can include in your main content. Let me explain, with reference to another great post…

From Common mistakes with the figure element:

The spec describes <figure> as being some flow content, optionally with a caption, that is self-contained and is typically referenced as a single unit from the main flow of the document. Therein lies the beauty of <figure>, that it can be moved away from the primary content — to a sidebar, say — without affecting the document’s flow.

So what happens if we were to move this content to a sidebar? By marking this content with <figure&gr;, we are characterizing it as a “single unit” (by which I understand, it is able to be taken from its current context without affecting the meaning of what’s behind). In this case, it leaves footer information with likes and dislikes and ‘posted by’ information without context.

What is wrong with a simple <img> for the image and <p> for the description?

<article class="pin">
<a href="me/cat/">
<img src="cat.jpg" alt="My awesome cat"/>
</a>
<p>Awesome cat description.</p>
<footer>
<ul class="stats">
<li>25 likes</li>
<li>2 comments</li>
<li>100 repins</li>
</ul>
<div class="attribution">
<a href="/me/">
<img src="me.jpg" alt="Profile picture of me">
</a>
<p><a href="/me/">Me</a> onto <a href="/here/">here</a></p>
</div>
</footer>
<menu class="actions" type="toolbar">
<button onclick="repin">Repin</button>
<button onclick="like">Like</button>
<button onclick="comment">Comment</button>
</menu>
</article>

By the way… what a blog post. It has helped me waste an entire day.

]]>