Closed (fixed)
Project:
Fusion
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Feb 2010 at 18:13 UTC
Updated:
15 Apr 2014 at 17:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
stephthegeek commentedWe'll look at doing this in Fusion itself in D7 -- too late for the current version.
Comment #2
stephthegeek commentedLack of an h1 on pages is also an accessibility problem. Patch attached for h1 on pages without titles, with some slightly updated CSS to standardize across div vs h1.
Comment #3
stephthegeek commentedIn the dev release
Comment #5
asb commentedIs there any chance to get this "backported" to the 6.x release, or should we hack the Fusion core templates ourselves? As far as I can see, lots of us a re stuck with D6 for a long time...
Various validators complain about the lack of h1 tags in Fusion subthemes as well, including SEO, accessibility, and semantic/structural aspects, and this is not limited to the frontpage, but affects constructs like this as well, I believe (example from
./sites/all/themes/fusion/fusion_core/node.tpl.php:(I'm currently trying to figure out how "valid" templates are supposed to be built and I'm not claiming to be an expert on correct structural markup; however, an analysis of Fusion-based sites with tools as provided by seitwert.de and the like indicate structural problems I'm trying to understand and to correct).
Comment #6
asb commentedTo overcome the mentioned deficiencies, I made the following modifications to my templates:
page.tpl.php:
node.tpl.php:
This gives me proper a) uniqe per page
headlines for nodes, views, and other page types, and b) a semi-semantic subheadline (with an CCK text field). I believe this preserves the hierarchical structure of the rendered page, and gets rid of validation errors because of missing
tags.
Please advise if this is proper procedure or breaks something else important in Fusion subthemes.
Thanks!
Comment #7
aquariumtap commentedHi asb, thanks for the feedback.
The attached patch for Fusion 6.x-1.x makes two changes:
That latter change makes me hesitant to include this patch into a D6 release. The issue is that any sites relying on Fusion's page.tpl.php will see the size of their site title change as a result of the new H1 tag. Thoughts on that (@stephthegeek, @sheena_d)?
Comment #8
aquariumtap commentedComment #9
asb commented@aquariumtap: Thanks, the patch looks good to me.
However I'm still quite interested to understand why the original node temple is using
<h2>.Comment #10
aquariumtap commented@asb, I'm not quite sure. I wasn't the original creator of the template, but I think we all agree that the change to
<h1>is the best path.Comment #11
sheena_d commentedThe title on the original node.tpl.php should only print out when the node is being displayed in teaser form. When on the node's page, the node's title becomes the page title and is not printed out via the node.tpl.php. Thus, the node title on node.tpl.php being wrapped in an
</h2>. I think with this change you will have an issue of multiple</h1>tags on a single page.I haven't tested the patch, though, it would not apply for me. Was this patch rolled before or after the other changes were committed to dev today?
Comment #12
asb commented@sheena_d: Yes, with my modifications from #6 I'm getting multiple h1 headlines under certain circumstances (nor for nodes, but in some Panels pages). Probably it's the same with the patch from #7.
I'm not sure it it is worse to have no h1 tags at all, or multiple h1 tags. At least logically a document might have multiple top-headlines (e.g. sections), but it can not have no top-headline.
Comment #13
sheena_d commented@asb - best practice is that a page should always have exactly one h1 tag. Having zero or multiple h1's is believed to be detrimental to SEO efforts.
The issue here isn't in using h1 as the site name on the homepage, just that the node's title should be left to the page template rather than the node template on the node's pag. This is the expected way for things to be handled in Drupal and it makes sense that Panels would be outputting multiple titles on node page panels.
aaaand, I just realized the patch wasn't working for me because I was trying to apply it to the D7 branch. lulz.
brb with new patch.
Comment #14
sheena_d commentedOk, I confirmed that the patch in #7 will cause multiple h1 tags on pages that list multiple node teasers.
To solve the problem of needing an h1 on every page (i.e. making the site name the h1 if there is not page title) there is no need to edit the node template. Not only was the previous edit causing multiple h1s, but this change to the node template could potentially have negative effects on already existing sub themes.
Attached is a patch that *only* uses an h1 tag for the site name if there is no page title, and makes no other changes to title handling.
@aquariumtap - I'm torn on whether this should be committed in 6.x-1.x or just left as a patch for those who want to use it. I think most of our custom sub-themes override the page template anyway (thus won't be affected by a change to Core's page template), but it could potentially cause problems for other custom Fusion sub-themes (but still, only a minor problem).
Comment #15
asb commentedThanks for the new patch. There seem to be very recent changes in the page template from 6.x-1.12 to 6.x-dev anyway; appying the patch against 6.x-1.12 fails, also I can not apply the patch against 6.x-dev from 2011-Sep-01 (the most recent release I can get through Drush), neither without nor with
-p0parameter.Comment #16
mgiffordWas this done in the D7 version? If so I think we could close this.
Comment #17
Poieo commentedThis was committed to D7 long ago and no development is being done on D6.