Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
Jeff Burnz CreditAttribution: Jeff Burnz commentedLets remove hgroup and switch the site slogan wrapper to a p element, seems like a reasonable approach.
Comment #2
capitolium CreditAttribution: capitolium commentedMy easiest solution:
Working fine in my sites with no more validation errors.
Comment #3
Jeff Burnz CreditAttribution: Jeff Burnz commentedIt 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.
Comment #4
mgiffordI 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.
Comment #5
Jeff Burnz CreditAttribution: Jeff Burnz commentedKilling it now, its happening!
It'll be along the lines of this:
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...).
Comment #6
mgiffordThanks! 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.
Comment #7
T.Mardi CreditAttribution: T.Mardi commentedHi 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).
Comment #8
Jeff Burnz CreditAttribution: Jeff Burnz commented#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.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commented+1 on number 7
---Thanks
Comment #10
mgiffordchanging the title so that it shows up better than "Remove from AdaptiveTheme templates" in lists of issues.
Comment #11
astutonetHi
I also updated the AT to the dec, 6 version and I have a similar issue:
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.Comment #12
Jeff Burnz CreditAttribution: Jeff Burnz commented@ astutonet, yeah, I have rethought that, I'll move the attribute variable back into preprocess to maintain backwards compatibility.
Comment #13
Jeff Burnz CreditAttribution: Jeff Burnz commentedPushed a commit that should solve all issues.
Comment #14
Jeff Burnz CreditAttribution: Jeff Burnz commentedShould be fixed now, added BC layer for existing themes/templates, removed some references to hgroup.
Comment #15
astutonetHi @Jeff, thanks for your reply.
I've downloaded the new version released today (Dec, 10) and apparently no problems.
Tks again.