This is a simple patch that does the following:

  1. wraps the site name with h1
  2. wraps the site slogan with h2
  3. if both site name and slogan are enabled, wrap them with hgroup element

Currently, the site name is wrapped in p element, unless there is no page title (which then displays as h1). From what I understand, this is no longer necessary in HTML 5 because of the sectioning content model.

Also, the wrapping of the hgroup with an if statement so it only appears when both the site name and slogan is what is specified in the HMTL 5 specs. hgroup should not be used when only one sectioning element is present. Personally, I also like the idea of removing unneeded wrapper anyways.

Rene

CommentFileSizeAuthor
convert_site_name_slogan.patch1.41 KBrhache

Comments

rhache’s picture

Issue tags: +html5

adding html5 tag to issue

jacine’s picture

Component: theme system » markup
Status: Active » Postponed

Hi @rhache!

Many of us use <hgroup> in our personal themes. The reason we didn't introduce it in page.tpl.php is because it's still sorta on the chopping block. There are people actively trying to get it removed from the spec.

I think the best thing to do here is postpone this issue for a while and revisit it after some time passes and reassess. If it's still there, we can discuss adding it in for sure.

rhache’s picture

I know hgroup has been in and out in the specs, so what about just changing it to a div for now.

The h1/h2 for the site name and slogan is still valid and better implementation that what's there currently.

Rene

akizuky’s picture

Status: Postponed » Closed (won't fix)

While I was looking at this I found that this div wrapping has been done with the recent migration to Twig templating system. The hgroup tag is out of the specification, so closing the issue.
http://lists.w3.org/Archives/Public/public-html-admin/2013Apr/0003.html