: Is the aside element recognised by Google? My page has a set up as below. As you can see it follows a simple structure but there are a number of elements of body text related to the various
My page has a set up as below. As you can see it follows a simple structure but there are a number of elements of body text related to the various links.
These text elements appear on the page using a JavaScript hover event as the trigger.
The downside of this is all that text is diluting the relevant/focused content of the page.
<h1>My Page Title</h1>
<p>My main body text optimised for SEO etc....</p>
<div id="sub-elements">
<a href="/1.html">Link to Element 1</a>
<p id="element-1-text">This text is hidden but displays when I hover over the "Element 1" link.</p>
<a href="/2.html">Link to Element 2</a>
<p id="element-2-text">This text is hidden but displays when I hover over the "Element 2" link.</p>
<a href="/3.html">Link to Element 3</a>
<p id="element-3-text">This text is hidden but displays when I hover over the "Element 3" link.</p>
</div>
I want the links to the sub-pages 1.html, 2.html and 3.html to be picked up by Google but I don't want their respective <p> tags to be treated as the main content of the page.
What would be the best practice in this scenario?
I'm wondering if it would be a good idea to wrap said <p> tags in <aside> tags on the chance that Google will recognise this and treat the text not directly applicable to the main body of the page.
More posts by @Nimeshi995
1 Comments
Sorted by latest first Latest Oldest Best
I mentioned this in comments earlier, but I think it is a reasonable solution and a better way to mark up the content...
Instead of having the p element (containing the tooltip) hardcoded in the HTML following the anchor, simply include this text in the anchors title attribute. This attribute is, after all, intended for this purpose... to provide the user additional information about the link and is naturally shown as a simple tooltip. The text is taken out of the main content of the page and is unlikely to influence searches for the page itself. It is intrinsically associated with the anchor, is more accessible and works for non-JS users.
For example:
<a href="/1.html" title="Additional help text for this link">Link to Element 1</a>
If you need extra styling then construct the "tooltip" (ie. create the p element) in the onmouseover event (not when the page loads) that copies the text from the title attribute (progressive enhancement). Since you are presumably using the onmouseover event anyway (to show the existing p element), this shouldn't be too much of a change to the code.
Just to answer your initial question... I don't think an aside element would be appropriate here (semantically). It is still part of the page content so would still be picked up by Google, with respect to the current page, whether it "understood" it or not.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.