Community Forums › Forums › Archived Forums › General Discussion › Why are sidebars, blocks using H tags?
- This topic has 5 replies, 2 voices, and was last updated 9 years, 8 months ago by Gary Jones.
-
AuthorPosts
-
July 14, 2014 at 3:43 pm #114302boldplanParticipant
I've noticed an issue - sidebar widget titles use H tags and there is a creation of a non-linear series of H tags.
http://my.studiopress.com/themes/magazine/#demo-full
I see H1, H3 and H4 but no H2 tag. On other pages I have H1, H2 and H4 but no H3 tag. This is because the post content based elements are being given header tags where I do not believe they belong or may not belong. My understanding has always been that H tags are supposed to be linear and sequential, such as an outline and not to be used as styling, which is left for CSS.
July 14, 2014 at 5:01 pm #114308Gary JonesMemberYou're right, but it's not something that's likely to be fixed anytime soon.
The h4 is to tell search engines that it's not as important, as it would be if it were a h2. It's certainly not done for stylistic reasons, since classes are used for styling.
What you could do, is leave it as h4, but filter in an aria-level=2 attribute instead. This tells supporting user agents that it should be treated as a level 2 heading for the purposes of the document outline.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
July 15, 2014 at 12:11 am #114357boldplanParticipantThanks for the response Gary. I've looked closer at the themes and see multiple H1 tags in the demos. I don't remember how this was changed in my themes or whether I did that myself. This is not good at all. It looks like the H1 is the attached to the logo/site name and the H2 to the site slogan. And then there is another H1 tag for the author box. I'm not sure how to address this but it certainly doesn't appear optimal.
I'm familiar to some degree with filtering but could you confirm with me the right way to do this filter. I don't want to make a mistake here and guessing won't serve well by having it substitute out H4 tags when I really need them. 🙂 I think that this would probably be an H4 as it relates to the sidebar, which I believe is what sets all the block titles in the Magazine theme. Thanks again.
July 15, 2014 at 8:15 am #114388Gary JonesMemberHave you selected the semantic heading option in the theme or seo settings box? This changes which element is used for certain headings.
I'm going to avoid telling you how to filter the change myself, as two accessibility folks have suggested that using aria-level is not good practice (it's not when better options are available). You'll hear how Genesis decides to fix this up when it's done.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
July 16, 2014 at 3:51 am #114496boldplanParticipantGary - many thanks on your detailed and honest responses. It's refreshing and why I like this place. 🙂
I don't see any heading option available in the theme or an SEO settings box. I'm using Magazine Pro with my own custom styling but nothing affecting the header tags. I'm also using WordPress SEO FWIW, which I don't believe messes with the overall general header tags and it's mostly done for managing indexing of pages, handling post excerpts and meta descriptions.
Regarding the headings -- many thanks for the info and glad they are looking into this. I discovered it after seeing my traffic decline somewhat after switching themes. I've now modified my own elements to "fake" them at times, e.g. using headers inside of text boxes rather than using the block titles. I can have my titles appear as h2 or h3 or just strong for semantic markup. I'm also using conditional widgets on the home page so that I can align everything perfectly there and then have the rest of the site be less affected, e.g. a stray h4 in the sidebar rather than the middle of the page as it is now on home pages. Overall, using Genesis has been a major plus.
July 16, 2014 at 8:55 am #114534Gary JonesMemberThe activation of WPSEO means Genesis disables its own SEO features, including the Genesis -> SEO Settings page, where the Semantic Heading setting is located. That's why you can't see it. However, it still may be having an affect, so you should disable WPSEO, head to Genesis -> SEO Settings and disable the semantic heading option, save, then re-enable WPSEO.
Let me know if that fixes the h1 headings for you - I'll register it as a bug if so.
You may also find the Genesis Accessible plugin (http://wordpress.org/plugins/genesis-accessible/) of interest.
WordPress Engineer, and key contributor the Genesis Framework | @GaryJ
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.