It doesn't really harm anything to leave it, but <hgroup> is being removed from W3's HTML 5.0 CR.

http://lists.w3.org/Archives/Public/public-html-admin/2013Apr/0003.html

[adaptivetheme] (7.x-3.x) $ grep -rn 'hgroup' *
at_core/inc/preprocess.inc:244:  // hgroup attributes
at_core/inc/preprocess.inc:245:  $vars['hgroup_attributes_array'] = array();
at_core/inc/preprocess.inc:247:    $vars['hgroup_attributes_array']['class'][] = $vars['visibility'];
at_core/inc/preprocess.inc:255:  // hgroup attributes
at_core/inc/preprocess.inc:256:  $vars['hgroup_attributes_array']['id'][] = 'name-and-slogan';
at_core/inc/process.inc:54:  $vars['hgroup_attributes'] = empty($vars['hgroup_attributes_array']) ? '' : drupal_attributes($vars['hgroup_attributes_array']);
at_core/scripts/html5.js:6:...footer,header,hgroup,nav,section...
at_core/scripts/html5.js:9: ...footer header hgroup main...
at_core/templates/page--full-width-wrappers.tpl.php:130:                <!-- start: Site name and Slogan hgroup -->
at_core/templates/page--full-width-wrappers.tpl.php:131:                <hgroup<?php print $hgroup_attributes; ?>>
at_core/templates/page--full-width-wrappers.tpl.php:141:                </hgroup><!-- /end #name-and-slogan -->
at_core/templates/page.tpl.php:114:            <hgroup<?php print $hgroup_attributes; ?>>
at_core/templates/page.tpl.php:124:            </hgroup>
at_subtheme/css/global.base.css:25:hgroup,
at_subtheme/css/global.styles.css:255: * Wrapper for the site name and slogan (hgroup)
at_subtheme/css/print.css:154:hgroup a:link, hgroup a:visited {
at_subtheme/sass/global.base.scss:31:hgroup,
at_subtheme/sass/global.styles.scss:320: * Wrapper for the site name and slogan (hgroup)
at_subtheme/sass/print.scss:174:hgroup a {

Comments

Lets remove hgroup and switch the site slogan wrapper to a p element, seems like a reasonable approach.

My easiest solution:

1) replace <hgroup> and </hgroup> with <div id="h-group"> </div> in page.tpl.php
2) replace all the occurrences of hgroup with #h-group in the css files

Working fine in my sites with no more validation errors.

It should be done, and will be by next release, its not so easy because I have to check a lot of things in all sub-themes that somewhere I might have gone crazy and use hgroup as an element selector, I don't think I have but need to check before pushing an update.

I just ran into this http://validator.w3.org/

Checked that it's still in git. Would a patch be useful? Not sure that a h-group id would be needed, or if there is indeed any benefit to grouping them at all.

There are a few references, but this is certainly a good one:
http://html5doctor.com/howto-subheadings/

With some examples. Certainly it will need sufficient time to test, but the patch itself should be easy to write I would think.

Killing it now, its happening!

It'll be along the lines of this:

<div id="name-and-slogan" class="h-group">
  ...
</div>

Seems I have declared this in many themes, but only to remove any padding or margin that a browser might have added to the element, afaict, so I'll suck up the breakages if any occur, I think not (consider there are 100 or more themes I built that have this, and 40 000 others...).

Thanks! Hopefully it doesn't have much of an impact for those who need to upgrade in the future. Ultimately, this is a lot bigger than AdaptiveTheme though, so everyone has to keep up with HTML5.

Hi Jeff, I have just installed the latest dev (Dec 6) and am getting this error:

Notice: Undefined variable: hgroup_attributes in include() (line 131 of /home/mysite/public_html/sites/all/themes/my_subtheme/page--full-width-wrappers.tpl.php).

#7, yep, good call, I did commit some parts of it earlier along with some other commits, still needs a full clean out of attributes, and most of the stuff rupl cites in the OP.

+1 on number 7

---Thanks

Title:Remove <hgroup> from AdaptiveTheme templatesRemove hgroup from AdaptiveTheme templates
Issue summary:View changes

changing the title so that it shows up better than "Remove from AdaptiveTheme templates" in lists of issues.

Hi

I also updated the AT to the dec, 6 version and I have a similar issue:

Notice: Undefined variable: hgroup_attributes in include() (line 37 of /home/mysite/public_html/sites/all/themes/at-commerce/templates/page.tpl.php).

It is noteworthy that for every page access there is a record in dblog.

Obviously if <hgroup> is removed, all of subthemes which depend on this information will register similar issues with this.

@ astutonet, yeah, I have rethought that, I'll move the attribute variable back into preprocess to maintain backwards compatibility.

Pushed a commit that should solve all issues.

Priority:Minor» Normal
Status:Active» Fixed

Should be fixed now, added BC layer for existing themes/templates, removed some references to hgroup.

Hi @Jeff, thanks for your reply.

I've downloaded the new version released today (Dec, 10) and apparently no problems.

Tks again.

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.