When displaying a node, the order of the elements presently is article, header, footer, content. This seems weird since header should be the header of the article that contains the title and byline and probably quick tabs, then the node content, then the footer should contain links, tabs, associated terms and the like. Is there a reason why it's ordered the way it is presently?

Also I suggest using hgroup within article, so it would go article, hgroup, header, content, footer to help with the document outline.

references

I can fix all this up but I didn't want to go submitting patches without a consensus/word from above.

Comments

marcoka’s picture

Status: Active » Needs review
cellar door’s picture

Assigned: Unassigned » himerus
Status: Needs review » Needs work
himerus’s picture

Title: incorrect order of semantic elements in node.tpl.php? » Discuss proper ordering/structure of semantic HTML5 elements in node.tpl.php

The current node.tpl.php for Omega is as follows:

<article<?php print $attributes; ?>>
  <?php print $user_picture; ?>
  <?php print render($title_prefix); ?>
  <?php if (!$page && $title): ?>
  <header>
    <h2<?php print $title_attributes; ?>><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
  </header>
  <?php endif; ?>
  <?php print render($title_suffix); ?>
  <?php if ($display_submitted): ?>
  <footer class="submitted"><?php print $date; ?> -- <?php print $name; ?></footer>
  <?php endif; ?>  
  
  <div<?php print $content_attributes; ?>>
    <?php
      // We hide the comments and links now so that we can render them later.
      hide($content['comments']);
      hide($content['links']);
      print render($content);
    ?>
  </div>
  
  <div class="clearfix">
    <?php if (!empty($content['links'])): ?>
      <nav class="links node-links clearfix"><?php print render($content['links']); ?></nav>
    <?php endif; ?>

    <?php print render($content['comments']); ?>
  </div>
</article>

The "original logic" (some of which I know was pilfered from one of the early HTML5 themes out there) was that well, the entire article wrapper makes sense of course, the the header should encompass items like the H2/H1 node title (all that is currently there) the footer element (can be placed ANYwhere on page/semantic element) and seemed well suited for the appropriate submitted by/timestamp data, but since drupal traditionally renders this at the top of a node, that is why it appears at the top. The nav element for the links makes sense.

I'm MORE than willing to entertain a new setup for this.. this has been an active discussion since anyone started attempting a good HTML5 set of templates for Drupl... I'd like to rather than use logic from any current D7 theme, use the logic (which I have NOT been following closely) of the D8 HTML5 initiative, and how the templates are shaping up in core for D8.

Let's discusss. (changing title to be more descriptive of where I think this issue will be headed in the Omega queue)

steinmb’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Assigned: himerus » Unassigned
Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)

Not sure we need to talk more about this. Close?